Package org.hibernate.reactive.exception
Class VertxSqlClientException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- javax.persistence.PersistenceException
-
- org.hibernate.HibernateException
-
- org.hibernate.reactive.exception.VertxSqlClientException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ConstraintViolationException
public class VertxSqlClientException extends HibernateException
Wraps aSQLException
. Indicates that an exception occurred during a JDBC call.- See Also:
SQLException
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description VertxSqlClientException(String message, SQLException cause)
Constructs a JDBCException using the given information.VertxSqlClientException(String message, SQLException cause, String sql)
Constructs a JDBCException using the given information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getErrorCode()
Get the vendor specific error code from the underlyingSQLException
.String
getSQL()
Get the actual SQL statement being executed when the exception occurred.SQLException
getSQLException()
Get the underlyingSQLException
.String
getSQLState()
Get the X/Open or ANSI SQL SQLState error code from the underlyingSQLException
.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
VertxSqlClientException
public VertxSqlClientException(String message, SQLException cause)
Constructs a JDBCException using the given information.- Parameters:
message
- The message explaining the exception conditioncause
- The underlying cause
-
VertxSqlClientException
public VertxSqlClientException(String message, SQLException cause, String sql)
Constructs a JDBCException using the given information.- Parameters:
message
- The message explaining the exception conditioncause
- The underlying causesql
- The sql being executed when the exception occurred
-
-
Method Detail
-
getSQLState
public String getSQLState()
Get the X/Open or ANSI SQL SQLState error code from the underlyingSQLException
.- Returns:
- The X/Open or ANSI SQL SQLState error code; may return null.
- See Also:
SQLException.getSQLState()
-
getErrorCode
public int getErrorCode()
Get the vendor specific error code from the underlyingSQLException
.- Returns:
- The vendor specific error code
- See Also:
SQLException.getErrorCode()
-
getSQLException
public SQLException getSQLException()
Get the underlyingSQLException
.- Returns:
- The SQLException
-
getSQL
public String getSQL()
Get the actual SQL statement being executed when the exception occurred.- Returns:
- The SQL statement; may return null.
-
-