Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

com.arcle.rmt.j2se.util.ExceptionWrapper Class Reference

Decorator for an Exception object. More...

List of all members.

Public Member Functions

 ExceptionWrapper (Exception wrapped)
 ExceptionWrapper (Exception wrapped, String message)
 Constructs a new ExceptionWrapper with the specified error message and wrapped object.

Exception getWrappedException ()
String getMessage ()
 Returns the error message string of this throwable object.

String getLocalizedMessage ()
 Creates a localized description of this Throwable.

String toString ()
 Returns a short description of this throwable object.

void printStackTrace ()
 Prints this Throwable and its backtrace to the standard error stream.

void printStackTrace (java.io.PrintStream s)
 Prints this Throwable and its backtrace to the specified print stream.

void printStackTrace (java.io.PrintWriter s)
 Prints this Throwable and its backtrace to the specified print writer.


Private Attributes

Exception _wrappedException


Detailed Description

Decorator for an Exception object.

Author:
Sasmito Adibowo
Version:
Id
ExceptionWrapper.java,v 1.4 2003/05/15 19:43:56 adib Exp

Definition at line 65 of file ExceptionWrapper.java.


Constructor & Destructor Documentation

com.arcle.rmt.j2se.util.ExceptionWrapper.ExceptionWrapper Exception  wrapped  ) 
 

Definition at line 67 of file ExceptionWrapper.java.

References com.arcle.rmt.j2se.util.ExceptionWrapper._wrappedException.

com.arcle.rmt.j2se.util.ExceptionWrapper.ExceptionWrapper Exception  wrapped,
String  message
 

Constructs a new ExceptionWrapper with the specified error message and wrapped object.

Parameters:
wrapped 
message the error message. The error message is saved for later retrieval by the getMessage() method.

Definition at line 79 of file ExceptionWrapper.java.

References com.arcle.rmt.j2se.util.ExceptionWrapper._wrappedException.


Member Function Documentation

String com.arcle.rmt.j2se.util.ExceptionWrapper.getLocalizedMessage  ) 
 

Creates a localized description of this Throwable.

Subclasses may override this method in order to produce a locale-specific message. For subclasses that do not override this method, the default implementation returns the same result as getMessage().

Returns:
The localized description of this Throwable.
Since:
JDK1.1

Definition at line 112 of file ExceptionWrapper.java.

References com.arcle.rmt.j2se.util.ExceptionWrapper.getWrappedException().

String com.arcle.rmt.j2se.util.ExceptionWrapper.getMessage  ) 
 

Returns the error message string of this throwable object.

Returns:
the error message string of this Throwable object if it was created with an error message string; or null if it was created with no error message.

Definition at line 98 of file ExceptionWrapper.java.

References com.arcle.rmt.j2se.util.ExceptionWrapper.getWrappedException().

Exception com.arcle.rmt.j2se.util.ExceptionWrapper.getWrappedException  ) 
 

Definition at line 84 of file ExceptionWrapper.java.

References com.arcle.rmt.j2se.util.ExceptionWrapper._wrappedException.

Referenced by com.arcle.rmt.j2se.util.ExceptionWrapper.getLocalizedMessage(), com.arcle.rmt.j2se.util.ExceptionWrapper.getMessage(), and com.arcle.rmt.j2se.util.ExceptionWrapper.printStackTrace().

void com.arcle.rmt.j2se.util.ExceptionWrapper.printStackTrace java.io.PrintWriter  s  ) 
 

Prints this Throwable and its backtrace to the specified print writer.

Parameters:
s PrintWriter to use for output
Since:
JDK1.1

Definition at line 202 of file ExceptionWrapper.java.

References com.arcle.rmt.j2se.util.ExceptionWrapper.getWrappedException().

void com.arcle.rmt.j2se.util.ExceptionWrapper.printStackTrace java.io.PrintStream  s  ) 
 

Prints this Throwable and its backtrace to the specified print stream.

Parameters:
s PrintStream to use for output

Definition at line 187 of file ExceptionWrapper.java.

References com.arcle.rmt.j2se.util.ExceptionWrapper.getWrappedException().

void com.arcle.rmt.j2se.util.ExceptionWrapper.printStackTrace  ) 
 

Prints this Throwable and its backtrace to the standard error stream.

This method prints a stack trace for this Throwable object on the error output stream that is the value of the field System.err. The first line of output contains the result of the toString() method for this object. Remaining lines represent data previously recorded by the method fillInStackTrace(). The format of this information depends on the implementation, but the following example may be regarded as typical:

java.lang.NullPointerException at MyClass.mash(MyClass.java:9) at MyClass.crunch(MyClass.java:6) at MyClass.main(MyClass.java:3)
This example was produced by running the program:

class MyClass {

public static void main(String[] argv) { crunch(null); } static void crunch(int[] a) { mash(a); }

static void mash(int[] b) { System.out.println(b[0]); } }

See also:
java.lang.System#err

Definition at line 173 of file ExceptionWrapper.java.

References com.arcle.rmt.j2se.util.ExceptionWrapper.getWrappedException().

String com.arcle.rmt.j2se.util.ExceptionWrapper.toString  ) 
 

Returns a short description of this throwable object.

If this Throwable object was created with an error message string, then the result is the concatenation of three strings:

  • The name of the actual class of this object
  • ": " (a colon and a space)
  • The result of the getMessage method for this object
If this Throwable object was created with no error message string, then the name of the actual class of this object is returned.

Returns:
a string representation of this Throwable.

Definition at line 132 of file ExceptionWrapper.java.


Member Data Documentation

Exception com.arcle.rmt.j2se.util.ExceptionWrapper._wrappedException [private]
 

Definition at line 210 of file ExceptionWrapper.java.

Referenced by com.arcle.rmt.j2se.util.ExceptionWrapper.ExceptionWrapper(), and com.arcle.rmt.j2se.util.ExceptionWrapper.getWrappedException().


The documentation for this class was generated from the following file:
Generated on Fri Jun 18 19:55:00 2004 for Arcle Rambutan by doxygen 1.3.5