|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
org.activemath.abstractcontent.MBaseException
public class MBaseException
a small exception wrapper for use inside *MBase* classes. It is intended to be subclassed (later) for type-distinct exceptions (so that a type-level decision of exception type can be taken). Exceptions don't need to be wrapped in, however.
| Field Summary | |
|---|---|
protected String |
description
interally stores this exception's description |
protected Exception |
exception
internally stores this exception's given sub-exception |
| Constructor Summary | |
|---|---|
MBaseException(Exception exception)
creates a new MBaseException with given exception |
|
MBaseException(String description)
creates a new MBaseException which has a description |
|
MBaseException(String description,
Exception exception)
creates a new MBaseException with given description and given exception |
|
| Method Summary | |
|---|---|
Exception |
getWrappedException()
returns the exception that was wrapped in |
void |
printStackTrace()
|
void |
printStackTrace(PrintStream out)
Prints the exception's stack trace as well as the wrapped exception's stack-trace, if any. |
void |
printStackTrace(PrintWriter writer)
|
String |
toString()
returns a string representation of this wrapped exception * |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String description
protected Exception exception
| Constructor Detail |
|---|
public MBaseException(String description)
public MBaseException(String description,
Exception exception)
exception - Exception to wrap in (i.e. to keep)description - Description of exception to give on .toString()public MBaseException(Exception exception)
exception - Exception to wrap in (i.e. to keep)
a matching description is automatically created using
exception's toString() method| Method Detail |
|---|
public String toString()
toString in class Throwablepublic Exception getWrappedException()
null, if
none was providedpublic void printStackTrace(PrintStream out)
printStackTrace in class Throwablepublic void printStackTrace(PrintWriter writer)
printStackTrace in class Throwablepublic void printStackTrace()
printStackTrace in class Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||