trait Monitor extends AnyRef
A Monitor is a composable exception handler. It is independent of position, divorced from the notion of a call stack. Monitors do not recover values from a failed computations: It handles only true exceptions that may require cleanup.
- Self Type
- Monitor
- See also
AbstractMonitor for an API friendly to creating instances from Java.
- Alphabetic
- By Inheritance
- Monitor
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
andThen(next: Monitor): Monitor
A new monitor which first handles the exception with
this
, then passes it ontonext
unconditionally.A new monitor which first handles the exception with
this
, then passes it ontonext
unconditionally. The new monitor handles the exception if eitherthis
ornext
does. -
def
apply(f: ⇒ Unit): Unit
Run
f
inside of the monitor context.Run
f
inside of the monitor context. Iff
throws an exception - directly or not - it is handled by this monitor. -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
orElse(next: Monitor): Monitor
A new monitor which, if
this
fails to handle the exception, attempts to letnext
handle it. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
tryHandle(exc: Throwable): Try[Unit]
An implementation widget: attempts to handle
exc
returning acom.twitter.util.Try[Unit]
.An implementation widget: attempts to handle
exc
returning acom.twitter.util.Try[Unit]
. If the exception is unhandled, we returnThrow(exc)
, if the handler throws an exception, we wrap it in a MonitorException.- Attributes
- protected
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )