Return magic value, throw exception or return false on failure?
I sometimes end up having to write a method or property for a class library for which it is not exceptional to have no real answer, but a failure. Something cannot be determined, is not available, not found, not currently possible or there is no more data available.
Generic way of handling exceptions in windows phone? [closed]
It’s difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 12 years ago. I mean what are some of the ways […]
Why are errors named as “Exception” but not as “Error” in programming languages?
I’ve been thinking about that for quite a while actually. I am not a native English speaker myself but still, I have years of programming experience and I always asked myself this. Why is it named as Exception
but not Error
since they are errors?
Is catching general exceptions really a bad thing?
I typically agree with most code analysis warnings, and I try to adhere to them. However, I’m having a harder time with this one:
Why are exceptions considered better than explicit error testing? [duplicate]
Possible Duplicate:
Defensive Programming vs Exception Handling?
if/else statements or exceptions
Best method in PHP for the Error Handling ? Convert all PHP errors (warnings notices etc) to exceptions?
What is the best method in PHP for the Error Handling ?
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.
Where should I handle fatal exceptions
Suppose I have a controller that loads a file and hands it over to the processing.
Use an else after exception (or not)
Consider this bit of code:
Designing exceptions for conversion failures
Suppose there are some methods to convert from “X” to “Y” and vice versa; the conversion may fail in some cases, and exceptions are used to signal conversion errors in those cases.