public void log( String str, Throwable e ) { logger.log( str + ": " + Debug.getNestedExceptionMessageAndStack( e )); }
@Override public void handshakeFailure( Throwable failure_msg ) { synchronized( UDPConnectionManager.this ){ if ( outbound_connection_count > 0 ){ outbound_connection_count--; } } f_helper.close( Debug.getNestedExceptionMessageAndStack(failure_msg)); listener.connectFailure( failure_msg ); }
@Override protected void abort( String reason, Throwable cause ) { String msg; if ( cause instanceof RuntimeException ){ msg = Debug.getNestedExceptionMessageAndStack( cause ); }else{ msg = Debug.getNestedExceptionMessage( cause ); } abort( reason + ": " + msg ); }
@Override public void failed( Throwable reason ) { synchronized( this ){ if ( reason instanceof IOException ){ failed = (IOException)reason; }else{ failed = new IOException( Debug.getNestedExceptionMessageAndStack(reason)); } fireReadSelect(); fireWriteSelect(); } connection.failedSupport( reason ); }
logText += " (" + Debug.getNestedExceptionMessageAndStack( error ) + ")";
@Override public void verify( pageDetails details ) throws SearchException { try{ String page = details.getContent(); if ( page != null && page.length() > 0 ){ ByteArrayInputStream bais = new ByteArrayInputStream( page.getBytes("UTF-8")); RSSFeed rssFeed = StaticUtilities.getRSSFeed( details.getInitialURL(), bais ); details.setVerifiedState( rssFeed ); } }catch( Throwable e ){ debugLog( "failed: " + Debug.getNestedExceptionMessageAndStack( e )); if ( e instanceof SearchException ){ throw((SearchException)e ); } throw( new SearchException( "RSS matching failed", e )); } } });
Debug.outNoStack( "Decode of '" + (header.length()>128?(header.substring(0,128) + "..."):header) + "' - " + Debug.getNestedExceptionMessageAndStack(e));
adapter.log( "Failed to parse XML from :" + url_str + ": " + Debug.getNestedExceptionMessageAndStack(e));
debugLog( "Failed to load page: " + Debug.getNestedExceptionMessageAndStack(e));
String msg = message==null?Debug.getNestedExceptionMessageAndStack( e ):message;
Debug.out( "Stream decode for " + connection.getString() + " failed: " + Debug.getNestedExceptionMessageAndStack(e));
throw( new TOTorrentException( "Torrent decode fails '" + Debug.getNestedExceptionMessageAndStack(e) + "'", TOTorrentException.RT_DECODE_FAILS, e ));
Debug.out( "Failed to decode peer id " + ByteFormatter.encodeString(peer_id) + ": " + Debug.getNestedExceptionMessageAndStack( e )); Debug.out( "Failed to decode peer id " + ByteFormatter.encodeString(peer_id) + ": " + Debug.getNestedExceptionMessageAndStack( e ));
debugLog( "failed: " + Debug.getNestedExceptionMessageAndStack( e ));
debugLog( "failed: " + Debug.getNestedExceptionMessageAndStack( e ));
@Override public void handshakeSuccess( ProtocolDecoder decoder, ByteBuffer remaining_initial_data ) { synchronized( UDPConnectionManager.this ){ if ( outbound_connection_count > 0 ){ outbound_connection_count--; } } TransportHelperFilter filter = decoder.getFilter(); try{ udp_transport.setFilter( filter ); if ( udp_transport.isClosed()){ udp_transport.close( "Already closed" ); listener.connectFailure( new Exception( "Connection already closed" )); }else{ if ( Logger.isEnabled()){ Logger.log(new LogEvent(LOGID, "Outgoing UDP stream to " + address + " established, type = " + filter.getName(false))); } udp_transport.connectedOutbound(); listener.connectSuccess( udp_transport, remaining_initial_data ); } }catch( Throwable e ){ Debug.printStackTrace(e); udp_transport.close( Debug.getNestedExceptionMessageAndStack(e)); listener.connectFailure( e ); } }
debugLog( "failed: " + Debug.getNestedExceptionMessageAndStack( e ));