Why exceptions for error handling is so important

Meta via Digitalmars-d digitalmars-d at puremagic.com
Tue Jan 13 16:40:08 PST 2015


On Wednesday, 14 January 2015 at 00:38:21 UTC, Walter Bright 
wrote:
> On 1/11/2015 2:48 AM, Walter Bright wrote:
>> However, if exceptions are thrown for errors instead, the 
>> programmer has to
>> deliberately add code if he wishes to ignore the error.
>
> Interesting that this article just appeared:
>
>   https://blog.golang.org/errors-are-values
>
> by Rob Pike on error handling in Go. He concludes with:
>
>   "But remember: Whatever you do, always check your errors!"
>
> Which sums up why exceptions are better!

But checked exceptions are definitely not.


More information about the Digitalmars-d mailing list