package io.vertx.pgclient.impl.codec;
import io.vertx.pgclient.PgException;
class ErrorResponse extends Response {
PgException toException() {
return new PgException(getMessage(), getSeverity(), getCode(), getDetail(), getHint(),
getPosition(), getInternalPosition(), getInternalQuery(), getWhere(), getFile(), getLine(), getRoutine(),
getSchema(), getTable(), getColumn(), getDataType(), getConstraint());
}
@Override
public String toString() {
return "ErrorResponse{" +
"severity='" + getSeverity() + '\'' +
", code='" + getCode() + '\'' +
", message='" + getMessage() + '\'' +
", detail='" + getDetail() + '\'' +
", hint='" + getHint() + '\'' +
", position='" + getPosition() + '\'' +
", internalPosition='" + getInternalPosition() + '\'' +
", internalQuery='" + getInternalQuery() + '\'' +
", where='" + getWhere() + '\'' +
", file='" + getFile() + '\'' +
", line='" + getLine() + '\'' +
", routine='" + getRoutine() + '\'' +
", schema='" + getSchema() + '\'' +
", table='" + getTable() + '\'' +
", column='" + getColumn() + '\'' +
", dataType='" + getDataType() + '\'' +
", constraint='" + getConstraint() + '\'' +
'}';
}
}