textbender.g.lang
Class CatcherP<S>

java.lang.Object
  extended by CatcherP<S>
All Implemented Interfaces:
Catcher<S>

public class CatcherP<S>
extends Object
implements Catcher<S>

A catcher that prints exceptions to the standard error stream, but rethrows errors. Never tested.


Nested Class Summary
 
Nested classes/interfaces inherited from interface Catcher
Catcher.X
 
Constructor Summary
CatcherP()
           
 
Method Summary
 void catchError(S source, Error r)
          Immediately re-throws the error.
 void catchException(S source, Exception x)
          Calls Catcher.X.printStackTrace( source, x, System.err ).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CatcherP

public CatcherP()
Method Detail

catchError

@ThreadSafe
public void catchError(S source,
                                  Error r)
Immediately re-throws the error. Subclasses that override this method would normally also re-throw it (or call super.catchError) taking care not to drop it first.

Specified by:
catchError in interface Catcher<S>
Parameters:
source - logical source of the error

catchException

@ThreadSafe
public void catchException(S source,
                                      Exception x)
Calls Catcher.X.printStackTrace( source, x, System.err ).

Specified by:
catchException in interface Catcher<S>
Parameters:
source - logical source of the exception