org.postgresql.util.PSQLException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of postgresql Show documentation
Show all versions of postgresql Show documentation
Java JDBC 4.0 (JRE 6+) driver for PostgreSQL database
/*
* Copyright (c) 2003, PostgreSQL Global Development Group
* See the LICENSE file in the project root for more information.
*/
package org.postgresql.util;
import java.sql.SQLException;
public class PSQLException extends SQLException {
private ServerErrorMessage _serverError;
public PSQLException(String msg, PSQLState state, Throwable cause) {
super(msg, state == null ? null : state.getState(), cause);
}
public PSQLException(String msg, PSQLState state) {
super(msg, state == null ? null : state.getState());
}
public PSQLException(ServerErrorMessage serverError) {
super(serverError.toString(), serverError.getSQLState());
_serverError = serverError;
}
public ServerErrorMessage getServerErrorMessage() {
return _serverError;
}
}