digitalmars.D.bugs - [Issue 6410] New: Few common exceptions in std.exception
- d-bugmail puremagic.com (32/32) Jul 30 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6410
http://d.puremagic.com/issues/show_bug.cgi?id=6410 Summary: Few common exceptions in std.exception Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc I am not fond of deep hierarchies of exceptions, because it's hard to remember them all, and use/catch them well. On the other hand there are very common exceptions that I think are worth having in a standard library, inside std.exception, as compromise. A rough list (surely to be improved, and maybe few more to be added): ArgumentException thrown when an argument is wrong or out of bound EmptyException thrown when applied on an empty item/collection IndexException thrown tipically on out of bound situations IOException thrown by File in error situations KeyException thrown by library-defined associative/sets when a key is missing. MissingMethodException thrown by ? OverflowException thrown on detected underflow/overflow situations (by to!() too?) IotaException thrown on errors in iota() function UncomparableException thrown by user-defined opCmp() of classes -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 30 2011