Packages

o

akka.japi

Throwables

object Throwables

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 and StackOverflowError, subclasses of VirtualMachineError), ThreadDeath, LinkageError, InterruptedException, ControlThrowable.

Note. this helper keep the same semantic with NonFatal in Scala. For example, all harmless Throwables can be caught by:

try {
  // dangerous stuff
} catch(Throwable e) {
  if (Throwables.isNonFatal(e)){
    log.error(e, "Something not that bad.");
  } else {
    throw e;
  }
Source
Throwables.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Throwables
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. 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

  2. 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