|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--com.sssw.rt.util.AgoException
The AgoException class is the base class of all SilverStream declared exceptions. They, like Exception, are a form of Throwable that indicates conditions that an application might want to catch.
Constructor Summary | |
AgoException()
Creates an AgoException with no message or parent exception. |
|
AgoException(String message)
Creates an AgoException with a message and no parent exception. |
|
AgoException(Throwable parent,
String message)
Creates an AgoException with a message and a parent exception. |
Method Summary | |
void |
copyTo(AgoException translatedX)
copyTo This method is used in exception translation, to initialize a new "translated" exception with the same resource manager and message as the original. |
static String |
getExceptionHTML(Throwable e)
Return the HTML contained in e or one of its ancestors. |
static String |
getExceptionMessage(Throwable e)
return the concatenation of all the messages of the e and its ancestors |
static String |
getExceptionMessage(Throwable e,
Locale locale)
return the concatenation of all the messages of the e and its ancestors |
String |
getHTML()
Returns the HTML contained in e or null if no HTML has been set
in e . |
String |
getMessage()
Returns the detail message of exception e or null if this exception
did not have a detailed message. |
String |
getMessage(Locale locale)
Returns the detail message of exception e or null if this exception
did not have a detailed message. |
static Throwable |
getParentException(Throwable e)
Returns the parent exception of this exception, if any. |
static void |
printStackTrace(Throwable e)
Prints the messages for all exceptions in the chain, and the stack trace for the last one. |
static void |
printStackTrace(Throwable e,
PrintStream stream)
Prints the messages for all exceptions in the chain, and the stack trace for the last one |
static void |
printStackTrace(Throwable e,
PrintWriter writer)
Prints the messages for all exceptions in the chain, and the stack trace for the last one |
void |
setHTML(String html)
Sets the HTML string associated with the exception. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace,
getLocalizedMessage,
printStackTrace,
printStackTrace,
printStackTrace,
toString |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Methods implemented from interface com.sssw.rt.util.AgiParentedException |
getExceptionParent |
Constructor Detail |
public AgoException()
throw new AgoException();
public AgoException(String message)
message
- the exception detail messagethrow new AgoException ("Security violation.");
AgoException.getExceptionMessage(Throwable e )
,
AgoException.getMessage()
public AgoException(Throwable parent, String message)
parent
- the parent exception for this exception.
The parent exception along with its message text can later be accessed via this exception.message
- the exception detail messagetry { ... } catch (Exception e) { // We throw a more specific AgoException, associating the original // exception with it. throw new AgoException (e, "Security violation."); }
AgoException.getParentException(Throwable e )
,
AgoException.getExceptionMessage(Throwable e )
,
AgoException.getMessage()
Method Detail |
public void copyTo(AgoException translatedX)
translatedX
- new exception to store the translated result.AgoException newException = new AgoException(); e.copyTo (newException);
public String getMessage()
e
or null if this exception
did not have a detailed message.String msg = e.getMessage();
AgoException.getExceptionMessage(Throwable e )
public String getMessage(Locale locale)
e
or null if this exception
did not have a detailed message.locale
- the locale to use when retrieving the messageString msg = e.getMessage (Locale.getDefault());
AgoException.getExceptionMessage(Throwable e )
public void setHTML(String html)
html
- the HTML string to associate with the exceptione.setHTML ("Exception text...");
AgoException.getHTML()
,
AgoException.getExceptionHTML(Throwable e )
public String getHTML()
e
or null if no HTML has been set
in e
.String htmlStr = AgoException.getHTML (e);
AgoException.setHTML(String html)
,
AgoException.getExceptionHTML(Throwable e )
public static String getExceptionMessage(Throwable e)
e
- the exception whose message and ancestor's messages should be returned.String msg = AgoException.getExceptionMessage (e);
AgoException.getExceptionMessage( Throwable e, Locale locale )
public static String getExceptionMessage(Throwable e, Locale locale)
e
- the exception whose message and ancestor's messages should be returnedlocale
- the locale to use when retrieving the message textString msg = AgoException.getExceptionMessage (e, Locale.getDefault());
public static void printStackTrace(Throwable e)
e
- the exceptionpublic static void printStackTrace(Throwable e, PrintStream stream)
e
- the exceptionstream
- the output streampublic static void printStackTrace(Throwable e, PrintWriter writer)
e
- the exceptionwriter
- the PrintWriterpublic static String getExceptionHTML(Throwable e)
e
- the exception to start searching for HTML in.String htmlStr = AgoException.getExceptionHTML (e);
public static Throwable getParentException(Throwable e)
Returns null if no parent exception exists.
e
- the exception whose parent should be returnedThrowable t = AgoException.getParentException (e);
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |