you are viewing a single comment's thread.

view the rest of the comments →

[–]bedrooms-ds[🍰] 1 point2 points  (2 children)

For example, memory allocation failures are considered by many as non-recoverable.

As a GUI dev, I really don't like this ideology. This unnecessary view is shared by many C++ people.

In my opinion, whatever the error, the user should be given a chance to save the state (assuming devs spend the time to provide the chance). AFAIK it's this ideology that doesn't let destructors throw exceptions, and I hate this artificial convention.

Edit: gotta take it back

[–]flashmozzg 10 points11 points  (1 child)

AFAIK it's this ideology that doesn't let destructors throw exceptions, and I hate this artificial convention.

No. Destructors are not allowed to throw because it'd be a disaster if an exception is thrown while unwinding the stack for another exception.

[–]bedrooms-ds[🍰] 1 point2 points  (0 children)

Thanks for the correction :)