Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ix.util
Class CatchingThread

    java.lang.Object
      java.lang.Thread
          ix.util.CatchingThread

All Implemented Interfaces:
  java.lang.Runnable

Direct Known Subclasses:
  IQuery.LookupThread, SerializedCommunicationStrategy.ObjectStreamNameServer, SerializedCommunicationStrategy.ObjectStreamServer, TransferThread

    public class CatchingThread

extends java.lang.Thread

A thread that catches and reports errors or exceptions.

Nested Class Summary

Nested classes/interfaces inherited from class java.lang.Thread
`java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler`

Field Summary

Fields inherited from class java.lang.Thread
`MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

Constructor Summary
`CatchingThread()`
`CatchingThread(java.lang.Runnable innerRunnable)`

Method Summary
`protected void` | `handleException(java.lang.Throwable except)` Called by `run()` if `innerRun()` throws an exception.
`protected void` | `innerRun()` Calls the run() method of the innerRunnable passed to the constructor, if innerRunnable is non-null; otherwise does nothing.
`void` | `run()` Calls innerRun() inside a catch that calls the `handleException(Throwable)` method on any Throwable caught.

Methods inherited from class java.lang.Thread
`activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### CatchingThread

    public CatchingThread()

### CatchingThread

    public CatchingThread(java.lang.Runnable innerRunnable)

Method Detail

### run

    public void run()

  Calls innerRun() inside a catch that calls the `handleException(Throwable)` method on any Throwable caught.

  Specified by:
    `run` in interface `java.lang.Runnable`
  Overrides:
    `run` in class `java.lang.Thread`

### innerRun

    protected void innerRun()

  Calls the run() method of the innerRunnable passed to the constructor, if innerRunnable is non-null; otherwise does nothing. An alternative to supplying an innerRunnable is to redefine this method in a subclass.

### handleException

    protected void handleException(java.lang.Throwable except)

  Called by `run()` if `innerRun()` throws an exception. The method supplied by the CatchingThread class calls `Debug.displayException(Throwable)`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD