public synchronized void processNotifies() throws SQLException { // Asynchronous notifies only arrive when we are not in a transaction if (protoConnection.getTransactionState() != ProtocolConnection.TRANSACTION_IDLE) return; try { while (pgStream.hasMessagePending()) { int c = pgStream.ReceiveChar(); switch (c) { case 'A': // Asynchronous Notify receiveAsyncNotify(); break; case 'E': // Error Message throw receiveErrorMessage(); // break; case 'N': // Error Notification protoConnection.addWarning(receiveNotification()); break; default: throw new PSQLException(GT.tr("Unknown Response Type {0}.", new Character((char) c)), PSQLState.CONNECTION_FAILURE); } } } catch (IOException ioe) { throw new PSQLException(GT.tr("An I/O error occured while sending to the backend."), PSQLState.CONNECTION_FAILURE, ioe); } }
handler.handleError(receiveErrorMessage());
SQLException newError = receiveErrorMessage(); if (error == null) error = newError;
public synchronized void processNotifies() throws SQLException { // Asynchronous notifies only arrive when we are not in a transaction if (protoConnection.getTransactionState() != ProtocolConnection.TRANSACTION_IDLE) return; try { while (pgStream.hasMessagePending()) { int c = pgStream.ReceiveChar(); switch (c) { case 'A': // Asynchronous Notify receiveAsyncNotify(); break; case 'E': // Error Message throw receiveErrorMessage(); // break; case 'N': // Error Notification protoConnection.addWarning(receiveNotification()); break; default: throw new PSQLException(GT.tr("Unknown Response Type {0}.", new Character((char) c)), PSQLState.CONNECTION_FAILURE); } } } catch (IOException ioe) { throw new PSQLException(GT.tr("An I/O error occured while sending to the backend."), PSQLState.CONNECTION_FAILURE, ioe); } }
public synchronized void processNotifies() throws SQLException { // Asynchronous notifies only arrive when we are not in a transaction if (protoConnection.getTransactionState() != ProtocolConnection.TRANSACTION_IDLE) return; try { while (pgStream.hasMessagePending()) { int c = pgStream.ReceiveChar(); switch (c) { case 'A': // Asynchronous Notify receiveAsyncNotify(); break; case 'E': // Error Message throw receiveErrorMessage(); // break; case 'N': // Error Notification protoConnection.addWarning(receiveNotification()); break; default: throw new PSQLException(GT.tr("Unknown Response Type {0}.", new Character((char) c)), PSQLState.CONNECTION_FAILURE); } } } catch (IOException ioe) { throw new PSQLException(GT.tr("An I/O error occured while sending to the backend."), PSQLState.CONNECTION_FAILURE, ioe); } }
handler.handleError(receiveErrorMessage());
SQLException newError = receiveErrorMessage(); if (error == null) error = newError;
handler.handleError(receiveErrorMessage());
SQLException newError = receiveErrorMessage(); if (error == null) error = newError;