textbender.g.lang
Interface Catcher<S>

All Known Implementing Classes:
Catcher0, CatcherL, CatcherP, PropertyChangeListenerR.DispatchCatcher, PropertyChangeListenerR.DispatchCatcherN

public interface Catcher<S>

A catcher of errors and exceptions.

Subtype implementers note: if adding catch methods, bear in mind that dispatch is decided according to formal parameter type at compile time; not actual type at runtime -- unlike catch statement parameters. Best to use a new, distinct name for each new method; rather than overload the ones defined here.


Nested Class Summary
static class Catcher.X
          Catcher utilities.
 
Method Summary
 void catchError(S source, Error r)
          Handles an error.
 void catchException(S source, Exception x)
          Handles an exception.
 

Method Detail

catchError

void catchError(S source,
                Error r)
Handles an error. Implementations would normally re-throw it as quickly as possible, taking care not to drop it first.

Parameters:
source - logical source of the error

catchException

void catchException(S source,
                    Exception x)
Handles an exception.

Parameters:
source - logical source of the exception