SQLException error = receiveErrorResponse(); handler.handleError(error); if (willHealViaReparse(error)) {
public synchronized void processNotifies() throws SQLException { waitOnLock(); // 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 Response (response to pretty much everything; backend then skips until Sync) throw receiveErrorResponse(); // break; case 'N': // Notice Response (warnings / info) SQLWarning warning = receiveNoticeResponse(); protoConnection.addWarning(warning); 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); } }
SQLException newError = receiveErrorResponse(); if (error == null) error = newError;
SQLException newError = receiveErrorResponse(); if (error == null) { error = newError;
case 'E': throw receiveErrorResponse(); case 'N': // Notice Response (warnings / info) SQLWarning warning = receiveNoticeResponse();
SQLException error = receiveErrorResponse(); handler.handleError(error);
public synchronized void processNotifies() throws SQLException { waitOnLock(); // 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 Response (response to pretty much everything; backend then skips until Sync) throw receiveErrorResponse(); // break; case 'N': // Notice Response (warnings / info) SQLWarning warning = receiveNoticeResponse(); protoConnection.addWarning(warning); 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 { waitOnLock(); // 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 Response (response to pretty much everything; backend then skips until Sync) throw receiveErrorResponse(); // break; case 'N': // Notice Response (warnings / info) SQLWarning warning = receiveNoticeResponse(); protoConnection.addWarning(warning); 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); } }
SQLException newError = receiveErrorResponse(); if (error == null) error = newError;
SQLException newError = receiveErrorResponse(); if (error == null) error = newError;
SQLException error = receiveErrorResponse(); handler.handleError(error);
SQLException error = receiveErrorResponse(); handler.handleError(error);