object Throwables
Ordering
- Alphabetic
- By Inheritance
Inherited
- Throwables
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- def isFatal(throwable: Throwable): Boolean
Returns true if the provided
Throwable
is to be considered fatal, or false if it is to be considered non-fatal - def isNonFatal(throwable: Throwable): Boolean
Returns true if the provided
Throwable
is to be considered non-fatal, or false if it is to be considered fatal
Helper class for determining whether a
Throwable
is fatal or not. User should only catch the non-fatal one,and keep rethrow the fatal one.Fatal errors are errors like
VirtualMachineError
(for example,OutOfMemoryError
andStackOverflowError
, subclasses ofVirtualMachineError
),ThreadDeath
,LinkageError
,InterruptedException
,ControlThrowable
.Note. this helper keep the same semantic with
NonFatal
in Scala. For example, all harmlessThrowable
s can be caught by: