public class SqlException extends Exception implements Diagnosable
| Modifier and Type | Field and Description |
|---|---|
protected Object[] |
args_ |
static String |
BATCH_POSITION_ID |
protected String |
cachedMessage_ |
static String |
CAUSED_BY_EXCEPTION_ID |
protected String |
causeString_ |
static String |
CLIENT_MESSAGE_RESOURCE_NAME |
protected static int |
DEFAULT_ERRCODE |
protected int |
errorcode_ |
protected String |
message_ |
protected String |
msgid_ |
protected SqlException |
nextException_ |
protected Sqlca |
sqlca_ |
protected String |
sqlstate_ |
protected Throwable |
throwable_ |
protected SQLException |
wrappedException_
The wrapped SQLException, if one exists
|
| Modifier | Constructor and Description |
|---|---|
|
SqlException(LogWriter logwriter,
ClientMessageId msgid) |
|
SqlException(LogWriter logwriter,
ClientMessageId msgid,
Object arg1) |
|
SqlException(LogWriter logwriter,
ClientMessageId msgid,
Object[] args) |
|
SqlException(LogWriter logWriter,
ClientMessageId msgid,
Object[] args,
SqlCode sqlcode) |
|
SqlException(LogWriter logWriter,
ClientMessageId msgid,
Object[] args,
SqlCode sqlcode,
Throwable t) |
|
SqlException(LogWriter logwriter,
ClientMessageId msgid,
Object[] args,
Throwable cause)
Create a SqlException.
|
|
SqlException(LogWriter logwriter,
ClientMessageId msgid,
Object arg1,
Object arg2) |
|
SqlException(LogWriter logwriter,
ClientMessageId msgid,
Object arg1,
Object arg2,
Object arg3) |
|
SqlException(LogWriter logwriter,
ClientMessageId msgid,
Object arg1,
Object arg2,
Object arg3,
Throwable cause) |
|
SqlException(LogWriter logWriter,
ClientMessageId msgid,
Object arg1,
Object arg2,
SqlCode sqlcode) |
|
SqlException(LogWriter logwriter,
ClientMessageId msgid,
Object arg1,
Object arg2,
Throwable cause) |
|
SqlException(LogWriter logWriter,
ClientMessageId msgid,
Object arg1,
SqlCode sqlcode) |
|
SqlException(LogWriter logwriter,
ClientMessageId msgid,
Object arg1,
Throwable cause) |
|
SqlException(LogWriter logWriter,
ClientMessageId msgid,
SqlCode sqlcode) |
|
SqlException(LogWriter logwriter,
ClientMessageId msgid,
Throwable cause) |
|
SqlException(LogWriter logWriter,
Sqlca sqlca)
Create an exception for an engine generated error.
|
protected |
SqlException(LogWriter logWriter,
String reason,
String sqlState,
int errorCode) |
protected |
SqlException(LogWriter logWriter,
Throwable throwable,
String reason,
String sqlState,
int errorCode,
String msgid,
Object[] args) |
|
SqlException(SQLException wrapme)
Wrap a SQLException in a SqlException.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getErrorCode() |
String |
getMessage() |
static com.pivotal.gemfirexd.internal.shared.common.i18n.MessageUtil |
getMessageUtil()
This routine provides singleton access to an instance of MessageUtil
that is constructed for client messages.
|
SqlException |
getNextException() |
Sqlca |
getSqlca() |
SQLException |
getSQLException(Agent agent)
Convert this SqlException into a java.sql.SQLException
|
SQLException |
getSQLException(Agent agent,
String columnName) |
String |
getSQLState() |
static SqlException |
javaException(LogWriter logWriter,
Throwable e)
Helper method to construct an exception which basically says that
we encountered an underlying Java exception
|
void |
printTrace(PrintWriter printWriter,
String header) |
void |
setNextException(SqlException nextException) |
void |
setNextException(SQLException nextException) |
String |
toString()
Similar to StandardException.toString().
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTraceprotected static final int DEFAULT_ERRCODE
protected transient Sqlca sqlca_
protected String message_
protected String cachedMessage_
protected String sqlstate_
protected int errorcode_
protected String causeString_
protected SqlException nextException_
protected Throwable throwable_
protected String msgid_
protected Object[] args_
public static String CLIENT_MESSAGE_RESOURCE_NAME
public static final String CAUSED_BY_EXCEPTION_ID
public static final String BATCH_POSITION_ID
protected SQLException wrappedException_
public SqlException(LogWriter logwriter, ClientMessageId msgid, Object[] args, Throwable cause)
logwriter - Can be null, but if provided, it is used to log this exceptionmsgid - The message id for this message. ClientMessageId is a simple type-safe
wrapper for com.pivotal.gemfirexd.internal.shared.common.reference.SQLState message id
strings.args - The set of substitution arguments for the message. The Java message
formatter will substitute these arguments into the internationalized
strings using the substitution ({0}, {1}, etc.) markers in the string.
Any object can be passed, but if you want it to be readable, make sure
toString() for the object returns something useful.cause - Can be null. Indicates the cause of this exception. If this is
an instance of SqlException or java.sql.SQLException then the exception
is chained into the nextException chain. Otherwise it is chained
using initCause(). On JDK 1.3, since initCause() does not exist,
a non-SQL exception can not be chained. Instead, the exception class
and message text is appended to the message for this exception.public SqlException(LogWriter logWriter, ClientMessageId msgid, Object[] args, SqlCode sqlcode, Throwable t)
public SqlException(LogWriter logWriter, ClientMessageId msgid, Object[] args, SqlCode sqlcode)
public SqlException(LogWriter logWriter, ClientMessageId msgid, SqlCode sqlcode)
public SqlException(LogWriter logWriter, ClientMessageId msgid, Object arg1, SqlCode sqlcode)
public SqlException(LogWriter logWriter, ClientMessageId msgid, Object arg1, Object arg2, SqlCode sqlcode)
public SqlException(LogWriter logwriter, ClientMessageId msgid, Throwable cause)
public SqlException(LogWriter logwriter, ClientMessageId msgid, Object[] args)
public SqlException(LogWriter logwriter, ClientMessageId msgid)
public SqlException(LogWriter logwriter, ClientMessageId msgid, Object arg1)
public SqlException(LogWriter logwriter, ClientMessageId msgid, Object arg1, Throwable cause)
public SqlException(LogWriter logwriter, ClientMessageId msgid, Object arg1, Object arg2, Throwable cause)
public SqlException(LogWriter logwriter, ClientMessageId msgid, Object arg1, Object arg2)
public SqlException(LogWriter logwriter, ClientMessageId msgid, Object arg1, Object arg2, Object arg3)
public SqlException(LogWriter logWriter, Sqlca sqlca)
logWriter - object used for tracingsqlca - the SQLCA sent from the serverprotected SqlException(LogWriter logWriter, String reason, String sqlState, int errorCode)
protected SqlException(LogWriter logWriter, Throwable throwable, String reason, String sqlState, int errorCode, String msgid, Object[] args)
public SqlException(SQLException wrapme)
public static com.pivotal.gemfirexd.internal.shared.common.i18n.MessageUtil getMessageUtil()
public SQLException getSQLException(Agent agent)
public SQLException getSQLException(Agent agent, String columnName)
public Sqlca getSqlca()
getSqlca in interface Diagnosablepublic String getMessage()
getMessage in class Throwablepublic String getSQLState()
public int getErrorCode()
public SqlException getNextException()
public void setNextException(SqlException nextException)
public void setNextException(SQLException nextException)
public void printTrace(PrintWriter printWriter, String header)
printTrace in interface Diagnosablepublic static SqlException javaException(LogWriter logWriter, Throwable e)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.