Skip to main content

New answers tagged

1 vote

When to write a custom exception handler?

By your own admission, this was some time ago but I'm wondering if the intention was to make it clear that you should handle any expected exceptions. That is - given the code in the try/catch (or ...
Robbie Dee's user avatar
  • 9,815
-2 votes

When to write a custom exception handler?

Unhandled exceptions (or exceptions that bubble up until they get handled by a runtime-provided or framework-provided default handler that logs a stack trace and then aborts a request or whatever) ...
hobbs's user avatar
  • 1,315
-1 votes

When to write a custom exception handler?

The primary considerations are: Can the custom handler do something useful and safe? What are the consequences of not handling the exception? It would depend on how exceptions are used. Exceptional ...
Adrian McCarthy's user avatar
8 votes

When to write a custom exception handler?

You write your own exception handlers when you want or need to do something in case the exception happens beyond crashing the application. This might include things like logging information take ...
jwenting's user avatar
  • 9,871
1 vote

When to write a custom exception handler?

A common situation with lots of possible exceptions is downloading any data from the server. You’d write a function that starts the download, you don’t wait for the result because it can take time (...
gnasher729's user avatar
  • 45.9k
14 votes

When to write a custom exception handler?

... write individual exception handlers for every possible error. You don't mention which language you were using, but I would guess it was Java. Java's Checked Exceptions require[d] this. ... when ...
Phill  W.'s user avatar
  • 12.4k
1 vote

Why do many exception messages not contain useful details?

I have found it very useful to divide the concept into two extremes and a grey area in-between. Error are intended to state that execution cannot continue because something went wrong. Errors are ...
Cort Ammon's user avatar
  • 11.6k
0 votes

The suffix Exception on exceptions in java

It's redundant if you know it is an exception. In reality, I would expect that say "FileNotFound" is an enum, and not a subclass of Exception. And then I would be wondering "how on ...
gnasher729's user avatar
  • 45.9k

Top 50 recent answers are included