Class

scala.util.control.Exception

Catch

Related Doc: package Exception

Permalink

class Catch[+T] extends Described

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.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Catch
  2. Described
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Catch(pf: Catcher[T], fin: Option[Finally] = None, rethrow: (Throwable) ⇒ Boolean = shouldRethrow)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def andFinally(body: ⇒ Unit): Catch[T]

    Permalink
  5. def apply[U >: T](body: ⇒ U): U

    Permalink

    Apply this catch logic to the supplied body.

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def desc: String

    Permalink
    Definition Classes
    Described
  9. def either[U >: T](body: ⇒ U): Either[Throwable, U]

    Permalink

    Apply this catch logic to the supplied body, mapping the result into Either[Throwable, T] - Left(exception) if an exception was caught, Right(T) otherwise.

  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. val fin: Option[Finally]

    Permalink
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. val name: String

    Permalink
    Attributes
    protected
    Definition Classes
    CatchDescribed
  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. def opt[U >: T](body: ⇒ U): Option[U]

    Permalink

    Apply this catch logic to the supplied body, mapping the result into Option[T] - None if any exception was caught, Some(T) otherwise.

  22. def or[U >: T](other: Catch[U]): Catch[U]

    Permalink
  23. def or[U >: T](pf2: Catcher[U]): Catch[U]

    Permalink

    Create a new Catch with additional exception handling logic.

  24. val pf: Catcher[T]

    Permalink
  25. val rethrow: (Throwable) ⇒ Boolean

    Permalink
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def toEither: Catch[Either[Throwable, T]]

    Permalink
  28. def toOption: Catch[Option[T]]

    Permalink

    Convenience methods.

  29. def toString(): String

    Permalink
    Definition Classes
    Described → AnyRef → Any
  30. def toTry: Catch[Try[T]]

    Permalink
  31. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. def withApply[U](f: (Throwable) ⇒ U): Catch[U]

    Permalink

    Create a Catch object with the same isDefinedAt logic as this one, but with the supplied apply method replacing the current one.

  35. def withDesc(s: String): Catch.this.type

    Permalink
    Definition Classes
    Described
  36. def withTry[U >: T](body: ⇒ U): Try[U]

    Permalink

    Apply this catch logic to the supplied body, mapping the result into Try[T] - Failure if an exception was caught, Success(T) otherwise.

Inherited from Described

Inherited from AnyRef

Inherited from Any

Ungrouped