Top Description Fields Constructors Methods
io.r2dbc.spi

public abstract Class R2dbcException

extends RuntimeException
Class Inheritance
Known Direct Subclasses
io.r2dbc.spi.R2dbcNonTransientException, io.r2dbc.spi.R2dbcTransientException

A root exception that should be extended by all server-related exceptions in an implementation.

Field Summary

Modifier and TypeField and Description
private final int
private final String
private final String

Constructor Summary

AccessConstructor and Description
public
public
R2dbcException(String
the reason for the error. Set as the exception's message and retrieved with getMessage().
reason
)

Creates a new R2dbcException.

public
R2dbcException(String
the reason for the error. Set as the exception's message and retrieved with getMessage().
reason
,
String
the "SQLState" string, which follows either the XOPEN SQLState conventions or the SQL:2003 conventions
sqlState
)

Creates a new R2dbcException.

public
R2dbcException(String
the reason for the error. Set as the exception's message and retrieved with getMessage().
reason
,
String
the "SQLState" string, which follows either the XOPEN SQLState conventions or the SQL:2003 conventions
sqlState
,
int
a vendor-specific error code representing this failure
errorCode
)

Creates a new R2dbcException.

public
R2dbcException(String
the reason for the error. Set as the exception's message and retrieved with getMessage().
reason
,
String
the "SQLState" string, which follows either the XOPEN SQLState conventions or the SQL:2003 conventions
sqlState
,
int
a vendor-specific error code representing this failure
errorCode
,
String
the SQL statement that caused this error
sql
)

Creates a new R2dbcException.

public
R2dbcException(String
the reason for the error. Set as the exception's message and retrieved with getMessage().
reason
,
String
the "SQLState" string, which follows either the XOPEN SQLState conventions or the SQL:2003 conventions
sqlState
,
int
a vendor-specific error code representing this failure
errorCode
,
String
the SQL statement that caused this error
sql
,
Throwable
the cause
cause
)

Creates a new R2dbcException.

public
R2dbcException(String
the reason for the error. Set as the exception's message and retrieved with getMessage().
reason
,
String
the "SQLState" string, which follows either the XOPEN SQLState conventions or the SQL:2003 conventions
sqlState
,
int
a vendor-specific error code representing this failure
errorCode
,
Throwable
the cause
cause
)

Creates a new R2dbcException.

public
R2dbcException(String
the reason for the error. Set as the exception's message and retrieved with getMessage().
reason
,
String
the "SQLState" string, which follows either the XOPEN SQLState conventions or the SQL:2003 conventions
sqlState
,
Throwable
the cause
cause
)

Creates a new R2dbcException.

public
R2dbcException(String
the reason for the error. Set as the exception's message and retrieved with getMessage().
reason
,
Throwable
the cause
cause
)

Creates a new R2dbcException.

public
R2dbcException(Throwable
the cause
cause
)

Creates a new R2dbcException.

Method Summary

Modifier and TypeMethod and Description
public final int

Returns:

the vendor-specific error code
getErrorCode
()

Returns the vendor-specific error code.

public final String

Returns:

the SQL
getSql
()

Returns the SQL that led to the problem (if known).

public final String

Returns:

the SQLState
getSqlState
()

Returns the SQLState.

public String
toString()

Overrides java.lang.Throwable.toString.

Returns a short description of this throwable.

Field Detail

errorCodeback to summary
private final int errorCode
sqlback to summary
private final String sql
Annotations
@Nullable
sqlStateback to summary
private final String sqlState
Annotations
@Nullable

Constructor Detail

R2dbcExceptionback to summary
public R2dbcException()

Creates a new R2dbcException.

R2dbcExceptionback to summary
public R2dbcException(String reason)

Creates a new R2dbcException.

Parameters
reason:String

the reason for the error. Set as the exception's message and retrieved with getMessage().

R2dbcExceptionback to summary
public R2dbcException(String reason, String sqlState)

Creates a new R2dbcException.

Parameters
reason:String

the reason for the error. Set as the exception's message and retrieved with getMessage().

sqlState:String

the "SQLState" string, which follows either the XOPEN SQLState conventions or the SQL:2003 conventions

R2dbcExceptionback to summary
public R2dbcException(String reason, String sqlState, int errorCode)

Creates a new R2dbcException.

Parameters
reason:String

the reason for the error. Set as the exception's message and retrieved with getMessage().

sqlState:String

the "SQLState" string, which follows either the XOPEN SQLState conventions or the SQL:2003 conventions

errorCode:int

a vendor-specific error code representing this failure

R2dbcExceptionback to summary
public R2dbcException(String reason, String sqlState, int errorCode, String sql)

Creates a new R2dbcException.

Parameters
reason:String

the reason for the error. Set as the exception's message and retrieved with getMessage().

sqlState:String

the "SQLState" string, which follows either the XOPEN SQLState conventions or the SQL:2003 conventions

errorCode:int

a vendor-specific error code representing this failure

sql:String

the SQL statement that caused this error

Since
0.9
R2dbcExceptionback to summary
public R2dbcException(String reason, String sqlState, int errorCode, String sql, Throwable cause)

Creates a new R2dbcException.

Parameters
reason:String

the reason for the error. Set as the exception's message and retrieved with getMessage().

sqlState:String

the "SQLState" string, which follows either the XOPEN SQLState conventions or the SQL:2003 conventions

errorCode:int

a vendor-specific error code representing this failure

sql:String

the SQL statement that caused this error

cause:Throwable

the cause

Since
0.9
R2dbcExceptionback to summary
public R2dbcException(String reason, String sqlState, int errorCode, Throwable cause)

Creates a new R2dbcException.

Parameters
reason:String

the reason for the error. Set as the exception's message and retrieved with getMessage().

sqlState:String

the "SQLState" string, which follows either the XOPEN SQLState conventions or the SQL:2003 conventions

errorCode:int

a vendor-specific error code representing this failure

cause:Throwable

the cause

R2dbcExceptionback to summary
public R2dbcException(String reason, String sqlState, Throwable cause)

Creates a new R2dbcException.

Parameters
reason:String

the reason for the error. Set as the exception's message and retrieved with getMessage().

sqlState:String

the "SQLState" string, which follows either the XOPEN SQLState conventions or the SQL:2003 conventions

cause:Throwable

the cause

R2dbcExceptionback to summary
public R2dbcException(String reason, Throwable cause)

Creates a new R2dbcException.

Parameters
reason:String

the reason for the error. Set as the exception's message and retrieved with getMessage().

cause:Throwable

the cause

R2dbcExceptionback to summary
public R2dbcException(Throwable cause)

Creates a new R2dbcException.

Parameters
cause:Throwable

the cause

Method Detail

getErrorCodeback to summary
public final int getErrorCode()

Returns the vendor-specific error code.

Returns:int

the vendor-specific error code

getSqlback to summary
public final String getSql()

Returns the SQL that led to the problem (if known).

Returns:String

the SQL

Annotations
@Nullable
Since
0.9
getSqlStateback to summary
public final String getSqlState()

Returns the SQLState.

Returns:String

the SQLState

Annotations
@Nullable
toStringback to summary
public String toString()

Overrides java.lang.Throwable.toString.

Doc from java.lang.Throwable.toString.

Returns a short description of this throwable. The result is the concatenation of:

  • the name of the class of this object
  • ": " (a colon and a space)
  • the result of invoking this object's getLocalizedMessage method
If getLocalizedMessage returns null, then just the class name is returned.
Returns:String

a string representation of this throwable.

Annotations
@Override