org.apache.derby.impl.jdbc
Class EmbedSQLException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.sql.SQLException
              extended byorg.apache.derby.impl.jdbc.EmbedSQLException
All Implemented Interfaces:
java.io.Serializable

public class EmbedSQLException
extends java.sql.SQLException

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

Field Summary
private  java.lang.Object[] arguments
           
private  java.lang.Throwable javaException
          Java exception that caused this exception, can be null.
private  java.lang.String messageId
           
private  boolean simpleWrapper
           
 
Fields inherited from class java.sql.SQLException
 
Fields inherited from class java.lang.Exception
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
(package private) EmbedSQLException(java.lang.String message, java.lang.String messageId, java.sql.SQLException nextException, int severity, 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.
  EmbedSQLException(java.lang.String message, java.lang.String messageId, java.sql.SQLException nextException, int severity, java.lang.Throwable t, java.lang.Object[] args)
           
 
Method Summary
 java.lang.Object[] getArguments()
           
 java.lang.Throwable getJavaException()
           
 java.lang.String getMessageId()
           
 boolean isSimpleWrapper()
           
 void printStackTrace()
          Print the stack trace of the wrapped java exception or this exception if there is none.
 void printStackTrace(java.io.PrintStream s)
          Print the stack trace of the wrapped java exception or this exception if there is none.
 void printStackTrace(java.io.PrintWriter s)
          Print the stack trace of the wrapped java exception or this exception if there is none.
 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, setNextException
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

arguments

private transient java.lang.Object[] arguments

messageId

private java.lang.String messageId

javaException

private transient java.lang.Throwable javaException
Java exception that caused this exception, can be null.


simpleWrapper

private transient boolean simpleWrapper
Constructor Detail

EmbedSQLException

EmbedSQLException(java.lang.String message,
                  java.lang.String messageId,
                  java.sql.SQLException nextException,
                  int severity,
                  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.


EmbedSQLException

public EmbedSQLException(java.lang.String message,
                         java.lang.String messageId,
                         java.sql.SQLException nextException,
                         int severity,
                         java.lang.Throwable t,
                         java.lang.Object[] args)
Method Detail

getJavaException

public java.lang.Throwable getJavaException()

getMessageId

public java.lang.String getMessageId()

getArguments

public java.lang.Object[] getArguments()

printStackTrace

public void printStackTrace()
Print the stack trace of the wrapped java exception or this exception if there is none.

See Also:
Throwable.printStackTrace()

printStackTrace

public void printStackTrace(java.io.PrintStream s)
Print the stack trace of the wrapped java exception or this exception if there is none.

See Also:
Throwable.printStackTrace()

printStackTrace

public void printStackTrace(java.io.PrintWriter s)
Print the stack trace of the wrapped java exception or this exception if there is none.

See Also:
Throwable.printStackTrace()

toString

public java.lang.String toString()
Override Throwables toString() to avoid the class name appearing in the message.


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()

Built on Mon 2007-06-04 09:58:47+0400, from revision ???

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.