D2 is really that stable as it is claimed to be?

Peter Williams pwil3058 at bigpond.net.au
Tue Sep 24 15:51:09 PDT 2013


On 25/09/13 06:29, Walter Bright wrote:
> On 9/23/2013 11:38 AM, bearophile wrote:
>> 2) The other improvement I'd like for D error messages and warnings is
>> to give a
>> standard error number. This is a simple improvement, but it makes
>> simpler to
>> write explanation pages for the errors. The C# compiler and other
>> compilers have
>> them.
>
> I used to do that, but again, it was a completely unwanted feature, and
> I abandoned it.
>
> It's simple enough to grep for the error message text, and I myself
> prefer to do the grep method.
>
> What makes me grumpy is people only want these things when some other
> compiler does it, sort of a bandwagon thing.

Grepping the text can be a problem if the output has been localised.

I write GUI wrappers for programs such as Mercurial/Git/Quilt and have 
been forced to use the (equivalent) of the grep to obtain details of the 
failure of a Mercurial/Git/Quilt command in order to add niceties as 
offering a "refresh and retry" option if (say) a quilt push fails 
because the repository needs to be refreshed.  The reason that I have to 
do this is that the error value returned by the commands isn't very 
useful (usually just 0 for success and -1 for failure).  The downside of 
this is that if my user has a locale that uses a language other than 
English my greps fail and the user misses out on the added niceties that 
would otherwise have been available.

The type of error return value I would have liked to have seen 
implemented in programs (I asked for changes but none were forthcoming) 
I write wrappers for would be a flag based system (I think that you can 
only count on 8 bits in the return value) to indicate the major 
characteristics of the failure.

Peter


More information about the Digitalmars-d mailing list