Package io.vertx.pgclient
Class PgException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- io.vertx.core.VertxException
-
- io.vertx.sqlclient.DatabaseException
-
- io.vertx.pgclient.PgException
-
- All Implemented Interfaces:
Serializable
public class PgException extends DatabaseException
PostgreSQL error including all fields of the ErrorResponse message of the PostgreSQL frontend/backend protocol.- Author:
- Julien Viet
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PgException(String errorMessage, String severity, String code, String detail)
PgException(String errorMessage, String severity, String code, String detail, String hint, String position, String internalPosition, String internalQuery, String where, String file, String line, String routine, String schema, String table, String column, String dataType, String constraint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getColumn()
String
getConstraint()
String
getDataType()
String
getDetail()
String
getErrorMessage()
String
getFile()
String
getHint()
String
getInternalPosition()
String
getInternalQuery()
String
getLine()
String
getPosition()
String
getRoutine()
String
getSchema()
String
getSeverity()
String
getSqlState()
SQL State (XOPEN or SQL:2003 conventions).String
getTable()
String
getWhere()
-
Methods inherited from class io.vertx.sqlclient.DatabaseException
getErrorCode
-
Methods inherited from class io.vertx.core.VertxException
noStackTrace, noStackTrace, noStackTrace
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
PgException
public PgException(String errorMessage, String severity, String code, String detail, String hint, String position, String internalPosition, String internalQuery, String where, String file, String line, String routine, String schema, String table, String column, String dataType, String constraint)
-
-
Method Detail
-
getErrorMessage
public String getErrorMessage()
- Returns:
- the primary human-readable error message ('M' field)
-
getSeverity
public String getSeverity()
- Returns:
- the severity: ERROR, FATAL, or PANIC, or a localized translation of one of these ('S' field)
-
getSqlState
public String getSqlState()
Description copied from class:DatabaseException
SQL State (XOPEN or SQL:2003 conventions).- Overrides:
getSqlState
in classDatabaseException
- Returns:
- the SQLSTATE code for the error ('S' field, value list), it is never localized
-
getDetail
public String getDetail()
- Returns:
- an optional secondary error message carrying more detail about the problem ('D' field), a newline indicates paragraph break.
-
getHint
public String getHint()
- Returns:
- an optional suggestion (advice) what to do about the problem ('H' field), a newline indicates paragraph break.
-
getPosition
public String getPosition()
- Returns:
- a decimal ASCII integer, indicating an error cursor position as an index into the original query string. ('P' field). The first character has index 1, and positions are measured in characters not bytes.
-
getWhere
public String getWhere()
- Returns:
- an indication of the context in which the error occurred ('W' field). Presently this includes a call stack traceback of active procedural language functions and internally-generated queries. The trace is one entry per line, most recent first.
-
getFile
public String getFile()
- Returns:
- file name of the source-code location where the error was reported ('F' field).
-
getLine
public String getLine()
- Returns:
- line number of the source-code location where the error was reported ('L' field).
-
getRoutine
public String getRoutine()
- Returns:
- name of the source-code routine reporting the error ('R' field).
-
getSchema
public String getSchema()
- Returns:
- if the error was associated with a specific database object, the name of the schema containing that object, if any ('s' field).
-
getTable
public String getTable()
- Returns:
- if the error was associated with a specific table, the name of the table ('t' field).
-
getColumn
public String getColumn()
- Returns:
- if the error was associated with a specific table column, the name of the column ('c' field).
-
getDataType
public String getDataType()
- Returns:
- if the error was associated with a specific data type, the name of the data type ('d' field).
-
getConstraint
public String getConstraint()
- Returns:
- if the error was associated with a specific constraint, the name of the constraint ('n' field).
-
getInternalPosition
public String getInternalPosition()
- Returns:
- a decimal ASCII integer, indicating an error cursor position ('p' field) as an index into the internally generated command (see 'q' field).
-
-