scala.util.control.Exception

Catch

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
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Catch
  2. Described
  3. AnyRef
  4. Any
Implicitly
  1. by StringAdd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

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

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from Catch[T] to StringAdd[Catch[T]] performed by method StringAdd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (Catch[T], B)

    Implicit information
    This member is added by an implicit conversion from Catch[T] to ArrowAssoc[Catch[T]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. def andFinally(body: ⇒ Unit): Catch[T]

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

    Apply this catch logic to the supplied body.

  10. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  11. def clone(): AnyRef

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

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

    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.

  14. def ensuring(cond: (Catch[T]) ⇒ Boolean, msg: ⇒ Any): Catch[T]

    Implicit information
    This member is added by an implicit conversion from Catch[T] to Ensuring[Catch[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: (Catch[T]) ⇒ Boolean): Catch[T]

    Implicit information
    This member is added by an implicit conversion from Catch[T] to Ensuring[Catch[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. def ensuring(cond: Boolean, msg: ⇒ Any): Catch[T]

    Implicit information
    This member is added by an implicit conversion from Catch[T] to Ensuring[Catch[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. def ensuring(cond: Boolean): Catch[T]

    Implicit information
    This member is added by an implicit conversion from Catch[T] to Ensuring[Catch[T]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. final def eq(arg0: AnyRef): Boolean

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

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

  21. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. def formatted(fmtstr: String): String

    Returns string formatted according to given format string.

    Returns string formatted according to given format string. Format strings are as for String.format (@see java.lang.String.format).

    Implicit information
    This member is added by an implicit conversion from Catch[T] to StringFormat[Catch[T]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  23. final def getClass(): Class[_]

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

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

    Definition Classes
    Any
  26. val name: String

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

    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

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

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

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

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

    Create a new Catch with additional exception handling logic.

  33. val pf: Catcher[T]

  34. val rethrow: (Throwable) ⇒ Boolean

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

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

  37. def toOption: Catch[Option[T]]

    Convenience methods.

  38. def toString(): String

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

  40. final def wait(): Unit

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

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

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

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

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

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

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

  46. def [B](y: B): (Catch[T], B)

    Implicit information
    This member is added by an implicit conversion from Catch[T] to ArrowAssoc[Catch[T]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from Described

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion StringAdd from Catch[T] to StringAdd[Catch[T]]

Inherited by implicit conversion StringFormat from Catch[T] to StringFormat[Catch[T]]

Inherited by implicit conversion Ensuring from Catch[T] to Ensuring[Catch[T]]

Inherited by implicit conversion ArrowAssoc from Catch[T] to ArrowAssoc[Catch[T]]

Ungrouped