View mode: basic / threaded / horizontal-split · Log in · Help
April 08, 2005
standard exceptions for phobos
Niko suggested phobos get a set of standard exception ala Java or .Net. An 
example he gave was ArgumentException(char[] msg, char[] argName). For more 
info about .Net's ArgumentException see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdiagnosticstracelistenerclasstopic.asp

I'd like to get more suggestions for standard exceptions. I like the 
subclasses of ArgumentException called ArgumentNullException and 
ArgumentOutOfRangeException. During my own development I've always wanted an 
IndexOutOfRangeException and UnsupportedOperationException.

Do people have more they'd like to see?
April 08, 2005
Re: standard exceptions for phobos
Ben Hinkle says...
>
..
..
..
>I'd like to get more suggestions for standard exceptions. I like the 
>subclasses of ArgumentException called ArgumentNullException and 
>ArgumentOutOfRangeException. During my own development I've always wanted an 
>IndexOutOfRangeException and UnsupportedOperationException.

I agree with those above.

>Do people have more they'd like to see? 

I do like to see a beginning to breakage thread including libraries called.
Something somewhat like java.  But, we should not copy java's nor .net's way of
doing their exceptions.  We should have our own that would make sense to the
programmer and to anyone that would see the exception or breakage.  Sometimes,
some of the errors in some system do not make sense.

Just a thought...

jic
April 09, 2005
Re: standard exceptions for phobos
>>Do people have more they'd like to see? 
>
>I do like to see a beginning to breakage thread including libraries called.
>Something somewhat like java.  But, we should not copy java's nor .net's way of
>doing their exceptions.  We should have our own that would make sense to the
>programmer and to anyone that would see the exception or breakage.  Sometimes,
>some of the errors in some system do not make sense.

I'm not sure what you mean by breakage thread. Also if you could give some
example of exception in other system you find cofusing it would help - or better
yet give example you particularly like :-)

-Ben
Top | Discussion index | About this forum | D home