Tagged Questions
41
votes
10answers
2k views
I've been told that Exceptions should only be used in exceptional cases. How do I know if my case is exceptional?
My specific case here is that the user can pass in a string into the application, the application parses it and assigns it to structured objects. Sometimes the user may type in something invalid. ...
2
votes
4answers
140 views
What is the best way to go about testing that we handle failures appropriately?
we're working on error handling in an application. We try to have fairly good automated test coverage. One big problem though is that we don't really know of a way to test some of our error handling.
...
38
votes
10answers
3k views
Why are exceptions considered better than explicit error testing? [duplicate]
Possible Duplicate:
Defensive Programming vs Exception Handling?
if/else statements or exceptions
I often come across heated blog posts where the author uses the argument: "exceptions vs ...
0
votes
1answer
359 views
Generic way of handling exceptions in windows phone? [closed]
I mean what are some of the ways other programmers deal with exception for example, when an error occurs when accessing a web service for say. If an example cant be given for windows phone, give the ...
1
vote
3answers
313 views
Good practice or service for monitoring unhandled application errors for a small organization
I'm working with multiple software with varying ways of monitoring for errors. When I make software, I usually send email with the stack trace to admins(usually me). Some customer software is ...
8
votes
8answers
569 views
Using a try-finally (without catch) vs enum-state validation
I have been reading the advice on this question about how an exception should be dealt with as close to where it is raised as possible.
My dilemma on the best practice is whether one should use a ...
4
votes
2answers
392 views
Is there a term for the error-handling anti-pattern of discarding all available info and just returning failure?
From time to time (unfortunately way too often) I have to fix code such as this:
// C++ code
bool anyOldFunction(Param p) {
try {
...
if(some_condition_here) {
handleErrorX();
return ...
4
votes
2answers
396 views
Checked vs Unchecked vs No Exception… A best practice of contrary beliefs
There are many requirements needed for a system to properly convey and handle exceptions. There are also many options for a language to choose from to implement the concept.
Requirements for ...