12
votes
5answers
856 views

Strengthening code with possibly useless exception handling

Is it a good practice to implement useless exception handling, just in case another part of the code is not coded correctly? Basic example A simple one, so I don't loose everybody :). Let's say I'm ...
0
votes
1answer
124 views

Exception handling class: static or object-oriented?

I am working in a windows service (using VB.Net) for internal use of my department. When ever a certain type of exception (FooException for now on) is captured, I follow the same logic: Log the ...
7
votes
6answers
1k views

Maybe monad vs exceptions

I wonder what are the advantages of Maybe monad over exceptions? It looks like Maybe is just explicit (and rather space-consuming) way of try..catch syntax. update Please note that I'm intentionally ...
9
votes
4answers
612 views

Using “catching exceptions” to improve readability, Good or Bad?

In the section When to Use Exception in The Pragmatic Programmer, the book writes that instead of: retcode = OK; if (socket.read(name) != OK) { retcode = BAD_READ; } else { ...