Re: Error Handling

new topic     » goto parent     » topic index » view thread      » older message » newer message

Jeffrey Fielding  wrote:

>I would rather use simple error return codes, like for open.

I was browsing through 'The Practice of Programming' by Kernighan and Pike, 
and the topic of exception handling came up. My recollection was that:

1. Exceptions be limited to real exceptions, like floating point errors. 
Files not opening are not exceptions. Languages (like Java) that use 
exceptions tend to go overboard and make everything an exception. This makes 
for very unclear code.

2 The user should be offered the chance to run some recovery routine. They 
weren't entirely enthusiastic about the idea of the program attempting to 
continue after a *true* exception, but they didn't disallow it entirely.

Just muddying the waters. blink

-- David Cuny

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu