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 Exceptions
In C++, for example, exceptions are often reserved for "exceptional" errors which leave the program in a bad or unknown state such that continuing could be dangerous. Any error that could be safely handled locally or by the immediate caller would likely be reported in a different way, like returning an error code. Occasionally, C++ exceptions indicate a rare error that need not be catastrophic if properly handled, but that handler probably would have to be far up the call stack.
In these cases, I would reserve exception handling for safety critical programs that might need to shut off the heaters, close the fuel valves, and activate the alarms before crashing. But, even in that case, we're not talking about a custom exception handler for a particular class of exceptions. That's just a catch-all handler similar to one that logs the exception before aborting the execution.
A reason to handle specific exceptions in C++ would be to insulate the program from a different exception style employed by a third-party library. At the layer that calls into the library, the program might catch exceptions the library is known to throw to either handle them, or to propagate the error report using the conventional style.
Expected Exceptions
In languages like Python and Java, exceptions are sometimes (often?) extensions of an API:
Frobnicate(foo)
either frobnicates the foo or it throws an exception.
In these cases, the exception is simply a means of reporting that the operation failed. It doesn't mean the program (or runtime) is in a bad state. It's expected that a caller not too far up the call chain could know what to do.
Vectored Exceptions
Handlers for vectored exceptions are akin to interrupt handlers. Instead of unwinding frames to find a handler, a registered handler is called, and it decides how the control flow should proceed.
Consider an implementation of a large-but-sparse array that reserves a huge block of virtual address space but postpones actually committing memory. When the application attempts to access an element, a page fault exception occurs. A custom handler could detect attempts to read or write in the array's reserved range and commit pages on demand. The code accessing the array needn't even be aware of the possibility of a problem, since the handler would return execution to the instruction that originally triggered the fault which would now succeed. (Example in Advanced Windows by Jeffrey Richter.)
If the hardware supports signals for division by zero or arithmetic overflow or underflow, a custom handler for those exceptions could help detect errors in live code, though it probably shouldn't try to fix-up and resume.