www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - standard exceptions for phobos

reply "Ben Hinkle" <bhinkle mathworks.com> writes:
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? 
Apr 08 2005
parent reply jicman <jicman_member pathlink.com> writes:
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
Apr 08 2005
parent Ben Hinkle <Ben_member pathlink.com> writes:
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
Apr 09 2005