Package com.palantir.exception
Class PalantirSqlException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.palantir.common.exception.PalantirRuntimeException
-
- com.palantir.exception.PalantirSqlException
-
- All Implemented Interfaces:
Serializable
public class PalantirSqlException extends PalantirRuntimeException
SQLExceptions are checked. However, generally speaking, we just want to propagate them. Having a whole bunch of 'throws' and 'catch throws' is ugly & unnecessary.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PalantirSqlException.DO_NOT_SET_INITIAL_SQL_EXCEPTION
static class
PalantirSqlException.SET_INITIAL_SQL_EXCEPTION
-
Constructor Summary
Constructors Modifier Constructor Description protected
PalantirSqlException(PalantirSqlException.DO_NOT_SET_INITIAL_SQL_EXCEPTION i)
protected
PalantirSqlException(PalantirSqlException.DO_NOT_SET_INITIAL_SQL_EXCEPTION i, String msg)
protected
PalantirSqlException(PalantirSqlException.SET_INITIAL_SQL_EXCEPTION i)
This is not safe to use with Throwables.chain()protected
PalantirSqlException(PalantirSqlException.SET_INITIAL_SQL_EXCEPTION i, String msg)
PalantirSqlException(String message, Throwable t)
Deprecated.Do not use! This should only be used by Throwables.rewrap which constructs new exceptions via reflection and relies on constructors with particular signatures being present.protected
PalantirSqlException(String msg, SQLException n)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PalantirSqlException
create()
static PalantirSqlException
create(String msg)
static PalantirSqlException
create(SQLException e)
static PalantirSqlException
createForChaining()
static PalantirSqlException
createForChaining(String msg)
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
PalantirSqlException
@Deprecated public PalantirSqlException(String message, Throwable t)
Deprecated.Do not use! This should only be used by Throwables.rewrap which constructs new exceptions via reflection and relies on constructors with particular signatures being present.
-
PalantirSqlException
protected PalantirSqlException(PalantirSqlException.DO_NOT_SET_INITIAL_SQL_EXCEPTION i)
-
PalantirSqlException
protected PalantirSqlException(PalantirSqlException.DO_NOT_SET_INITIAL_SQL_EXCEPTION i, String msg)
-
PalantirSqlException
protected PalantirSqlException(PalantirSqlException.SET_INITIAL_SQL_EXCEPTION i)
This is not safe to use with Throwables.chain()
-
PalantirSqlException
protected PalantirSqlException(PalantirSqlException.SET_INITIAL_SQL_EXCEPTION i, String msg)
-
PalantirSqlException
protected PalantirSqlException(String msg, SQLException n)
-
-
Method Detail
-
create
public static PalantirSqlException create()
-
create
public static PalantirSqlException create(String msg)
-
create
public static PalantirSqlException create(SQLException e)
-
createForChaining
public static PalantirSqlException createForChaining()
-
createForChaining
public static PalantirSqlException createForChaining(String msg)
-
-