exceptions vs error codes

Max Samukha via Digitalmars-d digitalmars-d at puremagic.com
Wed Jul 13 00:14:04 PDT 2016


On Sunday, 10 July 2016 at 16:57:49 UTC, ketmar wrote:
> On Sunday, 10 July 2016 at 16:47:31 UTC, Chris Wright wrote:
>> You do need a try/catch in every annotated function to catch 
>> runtime exceptions like OutOfMemoryError.
>
> as a side note: it is even not guaranteed that one *can* catch 
> Error. and it is plainly wrong to try to continue execution 
> after that, as program is in undefined state.

Undefined does not imply corrupt. There are many examples of 
programs that give you the last chance to save the state after a 
failure.


More information about the Digitalmars-d mailing list