Last update January 19, 2007

Doc Comments /
Errors



Difference (previous author) (Change, Edit, normal page display)

Changed: 1c1
=Handling errors=
=Error Handling in D=

Changed: 3c3
== More Information =
== Messages =

Changed: 5c5
== Examples =
Add your comments here...

Deleted: 7,30d6
* DsourceTutorial:HandlingErrorsCategory
* Posting:digitalmars.D/12206


== Message =
The documentation page for errors and exceptions is not very enlightening. It explains why D uses errors, but doesn't give a clue about the syntax.

Do you throw anything? only references? only references to classes inheriting from std.Exception? do you have to declare what you throw in the function definition, as in java?
can you catch and rethrow without asinging the exception to a handle as in:
try{
//something
}
catch(){
writefln("foobar message");
throw;
}
Give us details on how it work. No-one really cares about how a good idea it was to do it the way it is, if you don't tell us how to use it actualy. Having already used exceptions in other languages it is not particularly difficult to find out by oneself by trying, and correcting if the compiler is not happy, but that's not realy fun.

Moreover, I seem to rembember having read about it somewhere. Just why isn't it in the spec ?



== Amendments =
You may add a link to this page on the DocumentationAmendments page to draw extra attention to your suggestion.

Changed: 33,34c9,13
*See the corresponding page in the D Specification: DigitalMars:d/errors.html
*Newsgroup thread: global exceptions handler, Posting:digitalmars.D/11982
* Corresponding page in the D Specification
*Examples:
** Handling Errors
** NG:digitalmars.D/12206
* global exceptions handler

Error Handling in D

Messages

Add your comments here...

Links


FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: January 19, 2007 22:29 (diff))