protected void handleError( Exception e ) { if( !go.get() ) return; errorHandler.handleError( this, e ); }
/** * Either calls the ErrorListener or closes the connection * if there are no listeners. */ protected void handleError( Throwable t ) { // If there are no listeners then close the connection with // a reason if( errorListeners.isEmpty() ) { log.log( Level.SEVERE, "Termining connection due to unhandled error", t ); DisconnectInfo info = new DisconnectInfo(); info.reason = "Connection Error"; info.error = t; closeConnections(info); return; } for( ErrorListener l : errorListeners ) { l.handleError( this, t ); } }
protected void handleError( Exception e ) { if( !go.get() ) return; errorHandler.handleError( this, e ); }
protected void handleError( Exception e ) { if( !go.get() ) return; errorHandler.handleError( this, e ); }
/** * Either calls the ErrorListener or closes the connection * if there are no listeners. */ protected void handleError( Throwable t ) { // If there are no listeners then close the connection with // a reason if( errorListeners.isEmpty() ) { log.log( Level.SEVERE, "Termining connection due to unhandled error", t ); DisconnectInfo info = new DisconnectInfo(); info.reason = "Connection Error"; info.error = t; closeConnections(info); return; } for( ErrorListener l : errorListeners ) { l.handleError( this, t ); } }
/** * Either calls the ErrorListener or closes the connection * if there are no listeners. */ protected void handleError( Throwable t ) { // If there are no listeners then close the connection with // a reason if( errorListeners.isEmpty() ) { log.log( Level.SEVERE, "Termining connection due to unhandled error", t ); DisconnectInfo info = new DisconnectInfo(); info.reason = "Connection Error"; info.error = t; closeConnections(info); return; } for( ErrorListener l : errorListeners ) { l.handleError( this, t ); } }