public class MTSQLException extends java.sql.SQLException implements MaximoSQLException
getExceptionsWithContext()
may
differ from exceptions returns from the getNextException chain.Constructor and Description |
---|
MTSQLException()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addException(MTContext context,
java.sql.SQLException se)
Add the exception and the context where the exception was thrown.
|
java.lang.Throwable |
getCause() |
java.lang.String |
getDefaultMessage()
Give the default message, for when the message isn't found in the message table.
|
int |
getErrorCode() |
java.lang.String |
getErrorGroup()
Give the error group.
|
java.lang.String |
getErrorKey() |
java.util.List<DoubleKey<MTContext,java.sql.SQLException>> |
getExceptionsWithContext()
Returns the list of exceptions that were caught
|
java.lang.String |
getMessage() |
java.lang.Object[] |
getParameters() |
void |
removeFromChain(int pos)
Remove the exception from it's position in the chain.
|
int |
replaceInChain(DoubleKey<MTContext,java.sql.SQLException> target,
DoubleKey<MTContext,java.sql.SQLException> replacement)
Replace an exception in the chained exceptions.
|
java.lang.String |
toString() |
getNextException, getSQLState, iterator, setNextException
public void addException(MTContext context, java.sql.SQLException se)
context
- The context of the connection where the exception occurred. Landlord, Master, etc...se
- The thrown exception.public int getErrorCode()
getErrorCode
in class java.sql.SQLException
public java.util.List<DoubleKey<MTContext,java.sql.SQLException>> getExceptionsWithContext()
public java.lang.String toString()
toString
in class java.lang.Throwable
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public java.lang.String getDefaultMessage()
MaximoSQLException
getDefaultMessage
in interface MaximoSQLException
public java.lang.String getErrorGroup()
MaximoSQLException
getErrorGroup
in interface MaximoSQLException
public java.lang.String getErrorKey()
getErrorKey
in interface MaximoSQLException
public java.lang.Object[] getParameters()
getParameters
in interface MaximoSQLException
public java.lang.Throwable getCause()
getCause
in interface MaximoSQLException
getCause
in class java.lang.Throwable
public int replaceInChain(DoubleKey<MTContext,java.sql.SQLException> target, DoubleKey<MTContext,java.sql.SQLException> replacement)
target
- The exception to removereplacement
- The replacement exceptionpublic void removeFromChain(int pos)
pos
-