protected final void error( final String msg, final Object... args ) { if( log != null ) { log.error( msg, args ); } }
protected final void error( final String msg, final Object... args ) { if( log != null ) { log.error( message, args ); } }
public final void handle( final HttpExchange exchange ) throws IOException { try { processExchange( exchange ); } catch( IOException ioe ) { getLog().error( "IOException", ioe ); // pass IOException through throw ioe; } catch( RuntimeException re ) { getLog().error( "RuntimeException", re ); // pass RuntimeExceptions through throw re; } catch( Exception t ) { getLog().error( "Uncaught Exception %s", t, t.getClass() ); } finally { exchange.close(); } }
final void close( final SocketProcessorHandler handler, final SocketChannel channel ) { try { closeSocketProcessorHandler( handler, channel ); handler.closing( channel ); } finally { try { channel.close(); } catch( IOException ioe ) { getLog().error( "IOException while closing channel", ioe ); } } }
getLog().error( "Closing channel %s", channel ); try
@Override protected void stopImpl() { if( getServerChannel() != null ) { try { getServerChannel().close(); } catch( IOException ex ) { getLog().error( "Failed to close serverChannel", ex ); } finally { setServerChannel( null ); } } } }
private final void runSelectionKey( SelectionKey key ) { try { if( !key.isValid() ) { invalid( key ); } else if( key.isAcceptable() ) { accept( key ); } else if( key.isConnectable() ) { connect( key ); } else if( key.isReadable() ) { read( key ); } else if( key.isWritable() ) { write( key ); } } catch( Exception ex ) { getLog().error( "Exception during select()", ex ); } }
@Override protected void initiate( final ResourceConfig rc, final WebApplication wa ) { try { // Add all classes discovered by the post processor to the ResourceConfig final Set<Class<?>> classes = Kernel.getInstance().<KernelComponentPostProcessor>getBean( PROCESSOR_BEAN ).getClasses(); log.debug( "Discovered %d provider/root classes", classes.size() ); rc.getClasses().addAll( classes ); log.debug( "%d provider/root classes in config", rc.getClasses().size() ); // Now initiate the WebApplication wa.initiate( rc, new KernelComponentProviderFactory() ); } catch( RuntimeException e ) { log.error( "Exception occurred when intialization", e ); throw e; } } }
serverLog.error( "ErrorCondition.%s", xe, ec ); ec.respond( this, message );
getLog().error( "%s: XMPPException[%s] - requested \"%s\" using \"%s\"", chatRoomJid, errorCode,