How should I handle logger failures?
In several of our company’s applications, we use a custom logger. It’s fairly robust, though we may replace it with something like NLog in the future. One of the logger’s tasks is to log any exceptions encountered in the application.
Replacing Throwing Exceptions with Notification in Validations
Martin Fowler recommends replacing exceptions with notifications when dealing with validations. Essentially, instead of throwing an exception, you append error messages to a Notification
object that gets returned. This allows you to keep exceptions to “exceptional” circumstances, and return all the validation information, not just the first one checked.
Replacing Throwing Exceptions with Notification in Validations
Martin Fowler recommends replacing exceptions with notifications when dealing with validations. Essentially, instead of throwing an exception, you append error messages to a Notification
object that gets returned. This allows you to keep exceptions to “exceptional” circumstances, and return all the validation information, not just the first one checked.
Coerce bad input or always crash early
The general consensus seems to favor the Crash Early approach, the most reputable source being the acclaimed Pragmatic Programmer book.
Scala and exception handling [closed]
Closed 9 years ago.
Scala and exception handling [closed]
Closed 9 years ago.
Where would be better to handle an exception?
Imagine I have the following DAO method:
Where would be better to handle an exception?
Imagine I have the following DAO method:
How to deal with historic exception specifications in maintained C++ code
Today, I discovered a few exception specifications in legacy code I’ve to maintain, when Cppcheck 1.68 ([Inconclusive]
but correctly) pointed out that the specified exceptions are not handled in specific portions of the code.
How to deal with historic exception specifications in maintained C++ code
Today, I discovered a few exception specifications in legacy code I’ve to maintain, when Cppcheck 1.68 ([Inconclusive]
but correctly) pointed out that the specified exceptions are not handled in specific portions of the code.