* @param errorResponseMessage the message containing the exception
*/
private void doError(AbstractConnection connection, ErrorResponseMessage errorResponseMessage) {
// When receiving an error packet, throw exception and let exceptionCaught notify future
String message = errorResponseMessage.getFields().get(ErrorField.MESSAGE);
DbException exception;
if (message == null) {
exception = new PgException(connection, errorResponseMessage.getFields());
} else {
exception = new PgException(connection, message, errorResponseMessage.getFields());
}