|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--com.hyperion.css.CSSException
This is a customized application exception class that is able to chain/link exceptions and the associated error codes.
Field Summary |
Constructor Summary | |
CSSException()
Creates a new exception with null as its message. |
|
CSSException(java.lang.String explanation)
Constructor that accepts the message detailing the exception. |
|
CSSException(java.lang.String explanation,
long errorCode)
Constructor that accepts a message and an errorCode detailing information about this exception. |
|
CSSException(java.lang.String explanation,
java.lang.Throwable rootException)
Creates a new exception with a message and a cause. |
|
CSSException(java.lang.Throwable rootException)
Creates a new exception with the cause. |
Method Summary | |
long |
getErrorCode()
The error code. |
java.lang.String |
getMessage(long errorCodeArg)
Gets the message based on the errorCode. |
java.lang.String |
getProvider()
Returns the provider name where this exception originated. |
java.lang.Throwable |
getRootCause()
Obtain the root exception, if any. |
void |
printStackTrace()
This would print the stack trace for this Throwable object on the error stream. |
void |
printStackTrace(java.io.PrintStream pS)
This would print the stack trace for this Throwable object on the output stream. |
void |
printStackTrace(java.io.PrintWriter pW)
This would print the stack trace for this Throwable object on the output writer. |
void |
setErrorCode(long errorCode)
Sets the error code. |
void |
setLocale(java.util.Locale locale)
Sets the locale for exception messages. |
void |
setRootCause(java.lang.Throwable exception)
Sets the cause for this exception. |
java.lang.String |
toString()
Returns the string representation. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CSSException(java.lang.String explanation)
Constructor that accepts the message detailing the exception.
explanation
- String that states the reason for the exception.public CSSException(java.lang.String explanation, long errorCode)
Constructor that accepts a message and an errorCode detailing information about this exception.
explanation
- String that states the reason for the exception.errorCode
- Specifies the type of error and is associated with an exception class.public CSSException(java.lang.Throwable rootException)
Creates a new exception with the cause.
rootException
- The exception that caused this exception.public CSSException(java.lang.String explanation, java.lang.Throwable rootException)
Creates a new exception with a message and a cause.
explanation
- String that states the reason for the exception.rootException
- The exception that caused this exception.public CSSException()
Creates a new exception with null as its message.
Method Detail |
public java.lang.String getMessage(long errorCodeArg)
Gets the message based on the errorCode.
The locale has to be set through
CSSAppExceptionIF.setLocale(Locale)
to get the message
in a particular locale. If the locale is not
set, the default locale is picked up.
public void setRootCause(java.lang.Throwable exception)
Sets the cause for this exception.
public java.lang.Throwable getRootCause()
Obtain the root exception, if any.
public void printStackTrace()
This would print the stack trace for this
Throwable
object on the error stream.
The error stream is specified by the value of
System.err
.
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream pS)
This would print the stack trace for this
Throwable
object on the output stream.
The output stream is specified by the value of
pS
.
printStackTrace
in class java.lang.Throwable
pS
- - the output streampublic void printStackTrace(java.io.PrintWriter pW)
This would print the stack trace for this
Throwable
object on the output writer.
The output writer is specified by the value of
pW
.
printStackTrace
in class java.lang.Throwable
pW
- - the output writerpublic java.lang.String toString()
Returns the string representation.
toString
in interface CSSAppExceptionIF
toString
in class java.lang.Throwable
public long getErrorCode()
The error code.
getErrorCode
in interface CSSAppExceptionIF
public void setErrorCode(long errorCode)
Sets the error code.
setErrorCode
in interface CSSAppExceptionIF
errorCode
- Specifies the type of error and is associated with an exception class.public java.lang.String getProvider()
Returns the provider name where this exception originated.
public void setLocale(java.util.Locale locale)
CSSAppExceptionIF
Sets the locale for exception messages.
You must set the locale before invoking
the getMessage(long)
.
setLocale
in interface CSSAppExceptionIF
locale
- The name of the geographical or cultural locale object defined in java.util.Locale.CSSAppExceptionIF.setLocale(Locale)
|
Copyright 2004 Hyperion Solutions Corporation. All rights reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |