Returns a partially constructed Catch object, which you must give
an exception handler function as an argument to by.
Returns a partially constructed Catch object, which you must give
an exception handler function as an argument to by. Example:
handling(ex1, ex2) by (_.printStackTrace)
A container class for catch/finally logic.
A container class for catch/finally logic.
Pass a different value for rethrow if you want to probably unwisely allow catching control exceptions and other throwables which the rest of the world may expect to get through.
A container class for finally code.
A Catch object which catches everything.
Creates a Catch object which will catch any of the supplied exceptions.
Creates a Catch object which will catch any of the supplied exceptions.
Since the returned Catch object has no specific logic defined and will simply
rethrow the exceptions it catches, you will typically want to call opt or
either on the return value, or assign custom logic by calling "withApply".
Note that Catch objects automatically rethrow ControlExceptions and others
which should only be caught in exceptional circumstances. If you really want
to catch exactly what you specify, use catchingPromiscuously instead.
Creates a Catch object which will catch any of the supplied exceptions.
Creates a Catch object which will catch any of the supplied exceptions.
Unlike "catching" which filters out those in shouldRethrow, this one will
catch whatever you ask of it: ControlThrowable, InterruptedException,
OutOfMemoryError, you name it.
Creates a Catch object which maps all the supplied exceptions to the given value.
Creates a Catch object which maps all the supplied exceptions to None.
Creates a Catch object which catches and ignores any of the supplied exceptions.
The empty Catch object.
A Catch object witch catches non-fatal exceptions.
!!! Not at all sure of every factor which goes into this, and/or whether we need multiple standard variations.
Returns a Catch object with no catch logic and the argument as Finally.
Creates a Catch object which unwraps any of the supplied exceptions.
Classes representing the components of exception handling. Each class is independently composable. Some example usages:
This class differs from
scala.util.Tryin that it focuses on composing exception handlers rather than composing behavior. All behavior should be composed first and fed to aCatchobject using one of theoptoreithermethods.