Packages

t

scala.util.control

ControlThrowable

trait ControlThrowable extends Throwable with NoStackTrace

A marker trait indicating that the Throwable it is mixed into is intended for flow control.

Note that Throwable subclasses which extend this trait may extend any other Throwable subclass (eg. RuntimeException) and are not required to extend Throwable directly.

Instances of Throwable subclasses marked in this way should not normally be caught. Where catch-all behaviour is required ControlThrowable should be propagated, for example:

import scala.util.control.ControlThrowable

try {
  // Body might throw arbitrarily
} catch {
  case c: ControlThrowable => throw c // propagate
  case t: Exception        => log(t)  // log and suppress
}
Source
ControlThrowable.scala
Linear Supertypes
NoStackTrace, java.lang.Throwable, java.io.Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ControlThrowable
  2. NoStackTrace
  3. Throwable
  4. Serializable
  5. AnyRef
  6. Any
Implicitly
  1. by RichException
  2. by any2stringadd
  3. by StringFormat
  4. by Ensuring
  5. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def addSuppressed(arg0: java.lang.Throwable): Unit
    Definition Classes
    Throwable
  2. def fillInStackTrace(): Throwable
    Definition Classes
    NoStackTrace → Throwable
  3. def getCause(): java.lang.Throwable
    Definition Classes
    Throwable
  4. def getLocalizedMessage(): String
    Definition Classes
    Throwable
  5. def getMessage(): String
    Definition Classes
    Throwable
  6. def getStackTrace(): Array[StackTraceElement]
    Definition Classes
    Throwable
  7. final def getSuppressed(): Array[java.lang.Throwable]
    Definition Classes
    Throwable
  8. def initCause(arg0: java.lang.Throwable): java.lang.Throwable
    Definition Classes
    Throwable
  9. def printStackTrace(arg0: PrintWriter): Unit
    Definition Classes
    Throwable
  10. def printStackTrace(arg0: PrintStream): Unit
    Definition Classes
    Throwable
  11. def printStackTrace(): Unit
    Definition Classes
    Throwable
  12. def setStackTrace(arg0: Array[StackTraceElement]): Unit
    Definition Classes
    Throwable
  13. def toString(): String

    Creates a String representation of this object.

    Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.

    returns

    a String representation of the object.

    Definition Classes
    Throwable → AnyRef → Any

Deprecated Value Members

  1. def getStackTraceString: String
    Implicit
    This member is added by an implicit conversion from ControlThrowable to RichException performed by method RichException in scala.Predef.
    Definition Classes
    RichException
    Annotations
    @deprecated
    Deprecated

    (Since version 2.11.0) use Throwable#getStackTrace