|
||||||||||
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.weborganic.berlioz.BerliozException
public class BerliozException
Class of exceptions thrown by this library.
This class should be used to wrap exceptions thrown by the tools or utility classes that are specific to this library.
For convenience, this class is XMLWritable
so
that if the exception is caught it can be converted into an XML message.
XMLWritable
,
Serialized FormConstructor Summary | |
---|---|
BerliozException(String message)
Creates a new Berlioz exception. |
|
BerliozException(String message,
ErrorID id)
Creates a new Berlioz exception wrapping an existing exception. |
|
BerliozException(String message,
Exception cause)
Creates a new Berlioz exception wrapping an existing exception. |
|
BerliozException(String message,
Exception cause,
ErrorID id)
Creates a new Berlioz exception wrapping an existing exception. |
Method Summary | |
---|---|
ErrorID |
id()
Returns the ID for this Berlioz Exception. |
void |
setId(ErrorID id)
To set the error ID of this Berlioz exception. |
void |
toXML(XMLWriter xml)
Deprecated. Will be removed in new releases |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BerliozException(String message)
message
- The message.public BerliozException(String message, Exception cause)
message
- The message.cause
- The wrapped exception.public BerliozException(String message, ErrorID id)
message
- The message.id
- An error ID to help with error handling and diagnostic (may be null
)public BerliozException(String message, Exception cause, ErrorID id)
message
- The message.cause
- The wrapped exception.id
- An error ID to help with error handling and diagnostic (may be null
)Method Detail |
---|
public final ErrorID id()
null
.public final void setId(ErrorID id)
id
- The error ID of the berlioz exception.@Deprecated public void toXML(XMLWriter xml) throws IOException
The XML generated is as follows:
<berlioz-exception>
<message>message</message>
<code class="comment"><!-- Only if there is additional information --></code>
<cause>exception string value</cause>
<stack-trace>the stack trace</stack-trace>
</berlioz-exception>
toXML
in interface XMLWritable
xml
- The XML writer to use.
IOException
- Should an error be thrown while writing
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |