private void fire( LogListener listener, LogEntry entry ) { try { listener.logged( entry ); } catch( Throwable e ) { //TODO: Log that we are removing the LogListener, since it is throwing exception. For now System.err System.err.println( "'" + listener + "' is removed as a LogListener, since it threw an exception." ); removeLogListener( listener ); } }
private void fire( LogListener listener, LogEntry entry ) { try { listener.logged( entry ); } catch( Throwable e ) { //TODO: Log that we are removing the LogListener, since it is throwing exception. For now System.err System.err.println( "'" + listener + "' is removed as a LogListener, since it threw an exception." ); removeLogListener( listener ); } }
private void fire( LogListener listener, LogEntry entry ) { try { listener.logged( entry ); } catch( Throwable e ) { //TODO: Log that we are removing the LogListener, since it is throwing exception. For now System.err System.err.println( "'" + listener + "' is removed as a LogListener, since it threw an exception." ); removeLogListener( listener ); } }
listener.logged(entry);
static void safeLogged(LogListener listener, LogEntry logEntry) { try { listener.logged(logEntry); } catch (RuntimeException e) { // "listener.logged" calls user code and might throw an unchecked exception // we catch the error here to gather information on where the problem occurred. getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$ e.printStackTrace(getErrorStream()); } catch (LinkageError e) { // Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001) getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$ e.printStackTrace(getErrorStream()); } }
static void safeLogged(LogListener listener, LogEntry logEntry) { try { listener.logged(logEntry); } catch (RuntimeException e) { // "listener.logged" calls user code and might throw an unchecked exception // we catch the error here to gather information on where the problem occurred. getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$ e.printStackTrace(getErrorStream()); } catch (LinkageError e) { // Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001) getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$ e.printStackTrace(getErrorStream()); } }
listener.logged(entry);
static void safeLogged(LogListener listener, LogEntry logEntry) { try { listener.logged(logEntry); } catch (RuntimeException e) { // "listener.logged" calls user code and might throw an unchecked exception // we catch the error here to gather information on where the problem occurred. getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$ e.printStackTrace(getErrorStream()); } catch (LinkageError e) { // Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001) getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$ e.printStackTrace(getErrorStream()); } }
static void safeLogged(LogListener listener, LogEntry logEntry) { try { listener.logged(logEntry); } catch (RuntimeException e) { // "listener.logged" calls user code and might throw an unchecked exception // we catch the error here to gather information on where the problem occurred. getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$ e.printStackTrace(getErrorStream()); } catch (LinkageError e) { // Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001) getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$ e.printStackTrace(getErrorStream()); } }
static void safeLogged(LogListener listener, LogEntry logEntry) { try { listener.logged(logEntry); } catch (RuntimeException e) { // "listener.logged" calls user code and might throw an unchecked exception // we catch the error here to gather information on where the problem occurred. getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$ e.printStackTrace(getErrorStream()); } catch (LinkageError e) { // Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001) getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$ e.printStackTrace(getErrorStream()); } }
static void safeLogged(LogListener listener, LogEntry logEntry) { try { listener.logged(logEntry); } catch (RuntimeException e) { // "listener.logged" calls user code and might throw an unchecked exception // we catch the error here to gather information on where the problem occurred. getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$ e.printStackTrace(getErrorStream()); } catch (LinkageError e) { // Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001) getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$ e.printStackTrace(getErrorStream()); } }
static void safeLogged(LogListener listener, LogEntry logEntry) { try { listener.logged(logEntry); } catch (RuntimeException e) { // "listener.logged" calls user code and might throw an unchecked exception // we catch the error here to gather information on where the problem occurred. getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$ e.printStackTrace(getErrorStream()); } catch (LinkageError e) { // Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001) getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$ e.printStackTrace(getErrorStream()); } }
static void safeLogged(LogListener listener, LogEntry logEntry) { try { listener.logged(logEntry); } catch (RuntimeException e) { // "listener.logged" calls user code and might throw an unchecked exception // we catch the error here to gather information on where the problem occurred. getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$ e.printStackTrace(getErrorStream()); } catch (LinkageError e) { // Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001) getErrorStream().println("LogListener.logged threw a non-fatal unchecked exception as follows:"); //$NON-NLS-1$ e.printStackTrace(getErrorStream()); } }
private void fire( LogListener listener, LogEntry entry ) { try { listener.logged( entry ); } catch( Throwable e ) { //TODO: Log that we are removing the LogListener, since it is throwing exception. For now System.err StatusLogger.getLogger().error("'{}' is removed as a LogListener since it threw an exception.", listener, e); removeLogListener( listener ); } }