org.apache.derby.impl.jdbc
Class EmbedSQLException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.sql.SQLException
org.apache.derby.impl.jdbc.EmbedSQLException
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Iterable<java.lang.Throwable>, DerbySQLException
public class EmbedSQLException
- extends java.sql.SQLException
- implements DerbySQLException
This class is what gets send over the wire in client/server
configuration. When running embedded, this has the detailed
stack trace for exceptions. In case of client/server, server
has all the stack trace information but client doesn't get
the stack trace, just the sql exception. The reason for this
implementation is the stack trace information is more relevant
on the server side and it also decreases the size of client
jar file tremendously.
- See Also:
- Serialized Form
Constructor Summary |
EmbedSQLException(java.lang.String message,
java.lang.String messageId,
java.sql.SQLException nextException,
int severity,
java.lang.Throwable t,
java.lang.Object[] args)
Because SQLException does not have settable fields,
the caller of the constructor must do message lookup,
and pass the appropriate values here for message, messageId,
and next exception. |
Method Summary |
java.lang.Object[] |
getArguments()
|
java.lang.String |
getMessageId()
|
boolean |
isSimpleWrapper()
Returns true if this instance of DerbySQLException wraps
a StandardException object. |
java.lang.String |
toString()
Override Throwables toString() to avoid the class name
appearing in the message. |
static java.sql.SQLException |
wrapStandardException(java.lang.String message,
java.lang.String messageId,
int code,
java.lang.Throwable se)
|
Methods inherited from class java.sql.SQLException |
getErrorCode, getNextException, getSQLState, iterator, setNextException |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
arguments
private transient java.lang.Object[] arguments
messageId
private java.lang.String messageId
simpleWrapper
private transient boolean simpleWrapper
EmbedSQLException
EmbedSQLException(java.lang.String message,
java.lang.String messageId,
java.sql.SQLException nextException,
int severity,
java.lang.Throwable t,
java.lang.Object[] args)
- Because SQLException does not have settable fields,
the caller of the constructor must do message lookup,
and pass the appropriate values here for message, messageId,
and next exception.
getMessageId
public java.lang.String getMessageId()
getArguments
public java.lang.Object[] getArguments()
toString
public java.lang.String toString()
- Override Throwables toString() to avoid the class name
appearing in the message.
- Overrides:
toString
in class java.lang.Throwable
wrapStandardException
public static java.sql.SQLException wrapStandardException(java.lang.String message,
java.lang.String messageId,
int code,
java.lang.Throwable se)
isSimpleWrapper
public boolean isSimpleWrapper()
- Description copied from interface:
DerbySQLException
- Returns true if this instance of DerbySQLException wraps
a StandardException object.
- Specified by:
isSimpleWrapper
in interface DerbySQLException
- Returns:
- true if this exception wraps a StandardException object
Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.