| java.lang.Object java.lang.Throwable java.lang.Exception org.apache.derby.iapi.error.StandardException
All known Subclasses: org.apache.derby.impl.store.raw.data.NoSpaceOnPage, org.apache.derbyTesting.unitTests.services.T_StandardException, org.apache.derby.impl.store.raw.data.LongColumnException,
StandardException | public class StandardException extends Exception (Code) | | StandardException is the root of all exceptions that are handled
in a standard fashion by the database code, mainly in the language code.
This class is abstract to ensure that an implementation only throws
a specific exception (e.g. TransactionException) which is a sub-class
A method in an iterface in a protocol under com.ibm.db2j.protocol.Database must
only throw a StandardException (if it needs to throw an exception).
This indicates that the method can throw an exception and therefore its
caller must ensure that any resources it allocates will be cleaned up
in the event of an exception in the StandardException hierarchy.
Implementations of methods that throw StandardException can have throws
clause that are more specific than StandardException.
|
Inner Class :public static class BadMessageArgumentException extends Throwable | |
Method Summary | |
public static StandardException | closeException() A special exception to close a session. | final public Object[] | getArguments() Returns the arguments for this exception,
if there are any. | final public int | getErrorCode() | public String | getErrorProperty(String type) Get the error code for an error given a type. | public String | getMessage() The message stored in the super class Throwable must be set
up object creation. | final public String | getMessageId() Return the message identifier that is used to look up the
error message text in the messages.properties file. | final public Throwable | getNestedException() Returns the nested exception for this exception,
if there is one. | final public String | getSQLState() Return the 5 character SQL State.
If you need teh identifier that was used to create the
message, then use getMessageId(). | public static String | getSQLStateFromIdentifier(String messageID) Convert a message identifer from org.apache.derby.iapi.reference.SQLState to
a SQLState five character string. | final public int | getSeverity() | public static int | getSeverityFromIdentifier(String messageID) Get the severity given a message identifier from org.apache.derby.iapi.reference.SQLState. | public static StandardException | interrupt(InterruptedException ie) | public static StandardException | newException(String messageID) | public static StandardException | newException(String messageID, Throwable t) | public static StandardException | newException(String messageID, Object a1) | public static StandardException | newException(String messageID, Throwable t, Object a1) | public static StandardException | newException(String messageID, Object a1, Object a2) | public static StandardException | newException(String messageID, Object a1, Throwable t) Dummy overload which should never be called. | public static StandardException | newException(String messageID, Throwable t, Object a1, Object a2) | public static StandardException | newException(String messageID, Object a1, Object a2, Object a3) | public static StandardException | newException(String messageID, Object a1, Object a2, Throwable t) Dummy overload which should never be called. | public static StandardException | newException(String messageID, Throwable t, Object a1, Object a2, Object a3) | public static StandardException | newException(String messageID, Object a1, Object a2, Object a3, Object a4) | public static StandardException | newException(String messageID, Throwable t, Object a1, Object a2, Object a3, Object a4) | public static StandardException | newException(String messageID, Object a1, Object a2, Object a3, Object a4, Object a5) | public static StandardException | newException(String messageID, Throwable t, Object a1, Object a2, Object a3, Object a4, Object a5) | public static StandardException | newException(String messageID, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) | public static StandardException | newException(String messageID, Throwable t, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6) | public static StandardException | newException(String messageID, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) | public static StandardException | newException(String messageID, Throwable t, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7) | public static StandardException | newException(String messageID, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8) | public static StandardException | newException(String messageID, Throwable t, Object a1, Object a2, Object a3, Object a4, Object a5, Object a6, Object a7, Object a8) | public static StandardException | newPreLocalizedException(String MessageID, Throwable t, String localizedMessage) Creates a new StandardException using message text that has already been localized.
Parameters: MessageID - The SQLState and severity are derived from the ID. | public static SQLWarning | newWarning(String messageId) | public static SQLWarning | newWarning(String messageId, Object a1) | public static SQLWarning | newWarning(String messageId, Object a1, Object a2) | public static StandardException | normalClose() | public static StandardException | plainWrapException(Throwable t) Similar to unexpectedUserException but makes no assumtion about
when the execption is being called. | final public int | report() Yes, report me. | final public void | setNestedException(Throwable nestedException) Sets the nested exception for this exception. | final public void | setReport(int report) Set my report type. | final public void | setSeverity(int severity) | public String | toString() Don't print the class name in the toString() method. | public static StandardException | unexpectedUserException(Throwable t) |
REPORT_ALWAYS | final public static int REPORT_ALWAYS(Code) | | |
REPORT_DEFAULT | final public static int REPORT_DEFAULT(Code) | | |
REPORT_NEVER | final public static int REPORT_NEVER(Code) | | |
StandardException | protected StandardException(String messageID)(Code) | | |
getArguments | final public Object[] getArguments()(Code) | | Returns the arguments for this exception,
if there are any.
|
getErrorCode | final public int getErrorCode()(Code) | | |
getErrorProperty | public String getErrorProperty(String type)(Code) | | Get the error code for an error given a type. The value of
the property messageId.type will be returned, e.g.
deadlock.sqlstate.
|
getMessage | public String getMessage()(Code) | | The message stored in the super class Throwable must be set
up object creation. At this time we cannot get any information
about the object itself (ie. this) in order to determine the
natural language message. Ie. we need to class of the objec in
order to look up its message, but we can't get the class of the
exception before calling the super class message.
Thus the message stored by Throwable and obtained by the
getMessage() of Throwable (ie. super.getMessage() in this
class) is the message identifier. The actual text message
is stored in this class at the first request.
|
getMessageId | final public String getMessageId()(Code) | | Return the message identifier that is used to look up the
error message text in the messages.properties file.
|
getNestedException | final public Throwable getNestedException()(Code) | | Returns the nested exception for this exception,
if there is one.
|
getSQLState | final public String getSQLState()(Code) | | Return the 5 character SQL State.
If you need teh identifier that was used to create the
message, then use getMessageId(). getMessageId() will return the
string that corresponds to the field in org.apache.derby.iapi.reference.SQLState.
|
getSQLStateFromIdentifier | public static String getSQLStateFromIdentifier(String messageID)(Code) | | Convert a message identifer from org.apache.derby.iapi.reference.SQLState to
a SQLState five character string.
Parameters: messageID - - the sql state id of the message from cloudscape String - the 5 character code of the SQLState ID to returned to the user |
getSeverity | final public int getSeverity()(Code) | | |
getSeverityFromIdentifier | public static int getSeverityFromIdentifier(String messageID)(Code) | | Get the severity given a message identifier from org.apache.derby.iapi.reference.SQLState.
|
newException | public static StandardException newException(String messageID, Object a1, Throwable t) throws BadMessageArgumentException(Code) | | Dummy overload which should never be called. Only used to
detect incorrect usage, at compile time.
Parameters: messageID - - the sql state id of the message Parameters: a1 - - Message arg Parameters: t - - Incorrectly placed exception to be nested nothing - always throws throws: BadMessageArgumentException - - always (dummy) |
newException | public static StandardException newException(String messageID, Object a1, Object a2, Throwable t) throws BadMessageArgumentException(Code) | | Dummy overload which should never be called. Only used to
detect incorrect usage, at compile time.
Parameters: messageID - - the sql state id of the message Parameters: a1 - - First message arg Parameters: a2 - - Second message arg Parameters: t - - Incorrectly placed exception to be nested nothing - always throws throws: BadMessageArgumentException - - always (dummy) |
newPreLocalizedException | public static StandardException newPreLocalizedException(String MessageID, Throwable t, String localizedMessage)(Code) | | Creates a new StandardException using message text that has already been localized.
Parameters: MessageID - The SQLState and severity are derived from the ID. However the text message is not. Parameters: t - The Throwable that caused this exception, null if this exception was not caused by another Throwable. Parameters: localizedMessage - The message associated with this exception.It is the caller's responsibility to ensure that this message is properly localized.See org.apache.derby.iapi.tools.i18n.LocalizedResource |
plainWrapException | public static StandardException plainWrapException(Throwable t)(Code) | | Similar to unexpectedUserException but makes no assumtion about
when the execption is being called. The error is wrapped as simply
as possible.
|
report | final public int report()(Code) | | Yes, report me. Errors that need this method to return
false are in the minority.
|
setNestedException | final public void setNestedException(Throwable nestedException)(Code) | | Sets the nested exception for this exception.
|
setReport | final public void setReport(int report)(Code) | | Set my report type.
|
setSeverity | final public void setSeverity(int severity)(Code) | | |
toString | public String toString()(Code) | | Don't print the class name in the toString() method.
|
|
|