//# 0 errors, 160 messages
//#
/*
    //#DMDircExceptionHandler.java:1:1: class: com.dmdirc.logger.DMDircExceptionHandler
    //#DMDircExceptionHandler.java:1:1: method: com.dmdirc.logger.DMDircExceptionHandler.com.dmdirc.logger.DMDircExceptionHandler__static_init
 * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package com.dmdirc.logger;

/**
 * Passes uncaught exceptions to the logger.
 */
public final class DMDircExceptionHandler implements
        Thread.UncaughtExceptionHandler {

    /** Instantiates the Exception handler. */
    public DMDircExceptionHandler() {
        super();
    //#DMDircExceptionHandler.java:33: method: void com.dmdirc.logger.DMDircExceptionHandler.com.dmdirc.logger.DMDircExceptionHandler()
    }
    //#DMDircExceptionHandler.java:34: end of method: void com.dmdirc.logger.DMDircExceptionHandler.com.dmdirc.logger.DMDircExceptionHandler()

    /** {@inheritDoc} */
    public void uncaughtException(final Thread t, final Throwable e) {
        Logger.appError(ErrorLevel.HIGH, e.toString(), e);
    //#DMDircExceptionHandler.java:38: method: void com.dmdirc.logger.DMDircExceptionHandler.uncaughtException(Thread, Throwable)
    //#input(void uncaughtException(Thread, Throwable)): "&#09;"._tainted
    //#input(void uncaughtException(Thread, Throwable)): "&#10;Which caused: "._tainted
    //#input(void uncaughtException(Thread, Throwable)): "-"._tainted
    //#input(void uncaughtException(Thread, Throwable)): ".log"._tainted
    //#input(void uncaughtException(Thread, Throwable)): ": "._tainted
    //#input(void uncaughtException(Thread, Throwable)): "A fatal error has occurred: "._tainted
    //#input(void uncaughtException(Thread, Throwable)): "An error has occurred: "._tainted
    //#input(void uncaughtException(Thread, Throwable)): "Date:"._tainted
    //#input(void uncaughtException(Thread, Throwable)): "Description: "._tainted
    //#input(void uncaughtException(Thread, Throwable)): "ID must be a positive integer: "._tainted
    //#input(void uncaughtException(Thread, Throwable)): "Level: "._tainted
    //#input(void uncaughtException(Thread, Throwable)): "errors"._tainted
    //#input(void uncaughtException(Thread, Throwable)): com.dmdirc.logger.ErrorLevel__static_init.new ErrorLevel(ErrorLevel__static_init#2)._tainted
    //#input(void uncaughtException(Thread, Throwable)): com.dmdirc.logger.ErrorManager__static_init.new Class[](ErrorManager__static_init#2).length
    //#input(void uncaughtException(Thread, Throwable)): com.dmdirc.logger.ErrorManager__static_init.new Class[](ErrorManager__static_init#2)[0..4_294_967_295]
    //#input(void uncaughtException(Thread, Throwable)): com.dmdirc.logger.ErrorManager__static_init.new ErrorManager(ErrorManager__static_init#1).errorListeners
    //#input(void uncaughtException(Thread, Throwable)): com.dmdirc.logger.ErrorManager__static_init.new ErrorManager(ErrorManager__static_init#1).errors
    //#input(void uncaughtException(Thread, Throwable)): com.dmdirc.logger.ErrorManager__static_init.new ErrorManager(ErrorManager__static_init#1).errors.__Lock
    //#input(void uncaughtException(Thread, Throwable)): com.dmdirc.logger.ErrorManager__static_init.new ErrorManager(ErrorManager__static_init#1).logReports
    //#input(void uncaughtException(Thread, Throwable)): com.dmdirc.logger.ErrorManager__static_init.new ErrorManager(ErrorManager__static_init#1).nextErrorID
    //#input(void uncaughtException(Thread, Throwable)): com.dmdirc.logger.ErrorManager__static_init.new ErrorManager(ErrorManager__static_init#1).reportQueue
    //#input(void uncaughtException(Thread, Throwable)): com.dmdirc.logger.ErrorManager__static_init.new ErrorManager(ErrorManager__static_init#1).reportThread
    //#input(void uncaughtException(Thread, Throwable)): com.dmdirc.logger.ErrorManager__static_init.new ErrorManager(ErrorManager__static_init#1).sendReports
    //#input(void uncaughtException(Thread, Throwable)): com.dmdirc.logger.ErrorReportStatus__static_init.new ErrorReportStatus(ErrorReportStatus__static_init#1).terminal
    //#input(void uncaughtException(Thread, Throwable)): com.dmdirc.logger.ErrorReportStatus__static_init.new ErrorReportStatus(ErrorReportStatus__static_init#5).terminal
    //#input(void uncaughtException(Thread, Throwable)): com.dmdirc.logger.ErrorReportStatus__static_init.new ErrorReportStatus(ErrorReportStatus__static_init#6).terminal
    //#input(void uncaughtException(Thread, Throwable)): com.dmdirc.ui.FatalErrorDialog$4__static_init.new int[](FatalErrorDialog$4__static_init#1).length
    //#input(void uncaughtException(Thread, Throwable)): com.dmdirc.ui.FatalErrorDialog$4__static_init.new int[](FatalErrorDialog$4__static_init#1)[0..4_294_967_295]
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ErrorFixedStatus.INVALID
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ErrorFixedStatus.KNOWN
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ErrorFixedStatus.UNKNOWN
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ErrorFixedStatus.UNREPORTED
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ErrorLevel.FATAL
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ErrorLevel.HIGH
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ErrorListener.__Descendant_Table[com/dmdirc/logger/ErrorListener]
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ErrorListener.__Descendant_Table[com/dmdirc/ui/FatalErrorDialog]
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ErrorListener.__Descendant_Table[others]
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ErrorListener.__Dispatch_Table.errorAdded(Lcom/dmdirc/logger/ProgramError;)V
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ErrorListener.__Dispatch_Table.errorStatusChanged(Lcom/dmdirc/logger/ProgramError;)V
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ErrorListener.__Dispatch_Table.isReady()Z
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ErrorManager.BANNED_EXCEPTIONS
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ErrorManager.java.lang.System.err
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ErrorManager.me
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ErrorReportStatus.ERROR
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ErrorReportStatus.NOT_APPLICABLE
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ErrorReportStatus.QUEUED
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ErrorReportStatus.WAITING
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/Logger.manager
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ProgramError.__Descendant_Table[com/dmdirc/logger/ProgramError]
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ProgramError.__Descendant_Table[others]
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ProgramError.errorDir
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ProgramError.java.lang.System.err
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ProgramError.writingSem
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/ui/FatalErrorDialog$4.$SwitchMap$com$dmdirc$logger$ErrorReportStatus
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/ui/FatalErrorDialog.__Dispatch_Table.errorAdded(Lcom/dmdirc/logger/ProgramError;)V
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/ui/FatalErrorDialog.__Dispatch_Table.errorStatusChanged(Lcom/dmdirc/logger/ProgramError;)V
    //#input(void uncaughtException(Thread, Throwable)): com/dmdirc/ui/FatalErrorDialog.__Dispatch_Table.isReady()Z
    //#input(void uncaughtException(Thread, Throwable)): e
    //#input(void uncaughtException(Thread, Throwable)): e._tainted
    //#output(void uncaughtException(Thread, Throwable)): com.dmdirc.logger.ErrorManager__static_init.new ErrorManager(ErrorManager__static_init#1).reportThread
    //#output(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ProgramError.errorDir
    //#output(void uncaughtException(Thread, Throwable)): new ErrorReportingThread(sendError#1) num objects
    //#output(void uncaughtException(Thread, Throwable)): new ErrorReportingThread(sendError#1).__Tag
    //#output(void uncaughtException(Thread, Throwable)): new ErrorReportingThread(sendError#1).queue
    //#output(void uncaughtException(Thread, Throwable)): new File(getErrorFile#1) num objects
    //#new obj(void uncaughtException(Thread, Throwable)): new ErrorReportingThread(sendError#1)
    //#new obj(void uncaughtException(Thread, Throwable)): new File(getErrorFile#1)
    //#pre[5] (void uncaughtException(Thread, Throwable)): init'ed(com.dmdirc.logger.ErrorManager__static_init.new ErrorManager(ErrorManager__static_init#1).logReports)
    //#pre[6] (void uncaughtException(Thread, Throwable)): com.dmdirc.logger.ErrorManager__static_init.new ErrorManager(ErrorManager__static_init#1).nextErrorID != null
    //#pre[9] (void uncaughtException(Thread, Throwable)): e != null
    //#pre[3] (void uncaughtException(Thread, Throwable)): (soft) com.dmdirc.logger.ErrorManager__static_init.new Class[](ErrorManager__static_init#2)[0..4_294_967_295] != null
    //#pre[7] (void uncaughtException(Thread, Throwable)): (soft) init'ed(com.dmdirc.logger.ErrorManager__static_init.new ErrorManager(ErrorManager__static_init#1).sendReports)
    //#pre[8] (void uncaughtException(Thread, Throwable)): (soft) init'ed(com.dmdirc.ui.FatalErrorDialog$4__static_init.new int[](FatalErrorDialog$4__static_init#1)[0..4_294_967_295])
    //#pre[11] (void uncaughtException(Thread, Throwable)): (soft) init'ed(com.dmdirc.logger.ErrorManager__static_init.new ErrorManager(ErrorManager__static_init#1).reportThread)
    //#pre[12] (void uncaughtException(Thread, Throwable)): (soft) init'ed(com/dmdirc/logger/ProgramError.errorDir)
    //#post(void uncaughtException(Thread, Throwable)): com/dmdirc/logger/ProgramError.errorDir == One-of{old com/dmdirc/logger/ProgramError.errorDir, &new File(getErrorFile#1)}
    //#post(void uncaughtException(Thread, Throwable)): init'ed(com/dmdirc/logger/ProgramError.errorDir)
    //#post(void uncaughtException(Thread, Throwable)): com.dmdirc.logger.ErrorManager__static_init.new ErrorManager(ErrorManager__static_init#1).reportThread == One-of{old com.dmdirc.logger.ErrorManager__static_init.new ErrorManager(ErrorManager__static_init#1).reportThread, &new ErrorReportingThread(sendError#1)}
    //#post(void uncaughtException(Thread, Throwable)): init'ed(com.dmdirc.logger.ErrorManager__static_init.new ErrorManager(ErrorManager__static_init#1).reportThread)
    //#post(void uncaughtException(Thread, Throwable)): new ErrorReportingThread(sendError#1) num objects <= 1
    //#post(void uncaughtException(Thread, Throwable)): init'ed(new ErrorReportingThread(sendError#1).__Tag)
    //#post(void uncaughtException(Thread, Throwable)): init'ed(new ErrorReportingThread(sendError#1).queue)
    //#post(void uncaughtException(Thread, Throwable)): new File(getErrorFile#1) num objects <= 1
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:getErrorManager
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:addError
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.util.concurrent.atomic.AtomicLong:getAndIncrement
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.util.Date
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.lang.IllegalArgumentException
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.lang.String:isEmpty
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.util.Arrays:copyOf
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.util.Date:clone
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.util.List:contains
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.util.List:add
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:com.dmdirc.logger.ErrorReportStatus:equals
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:fireErrorStatusChanged
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.lang.Object:notifyAll
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.util.concurrent.BlockingQueue:add
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.lang.Thread:isAlive
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.lang.Thread
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:com.dmdirc.logger.ErrorReportingThread:setDaemon
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.lang.Thread:start
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.awt.GraphicsEnvironment:isHeadless
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.io.PrintStream:println
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:javax.swing.SwingUtilities:invokeLater
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.util.concurrent.Semaphore
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.util.concurrent.Semaphore:acquireUninterruptibly
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.lang.Object:wait
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:com.dmdirc.util.ListenerList:get
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:isReady
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:errorAdded
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:com.dmdirc.logger.ErrorFixedStatus:equals
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.lang.String:startsWith
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.io.File:exists
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:com.dmdirc.Main:getConfigDir
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.io.File
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.io.File:mkdirs
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.util.Date:getTime
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.io.File:renameTo
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.io.File:createNewFile
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.io.FileOutputStream
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.util.concurrent.Semaphore:release
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.io.IOException:printStackTrace
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.io.OutputStream
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.io.PrintWriter
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.io.PrintWriter:println
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.io.PrintWriter:close
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.lang.Throwable:getStackTrace
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.lang.Throwable:toString
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.lang.StackTraceElement:toString
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.lang.Throwable:getCause
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:getTrace
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.lang.Object:getClass
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.lang.Object:equals
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:com.dmdirc.logger.ErrorReportStatus:ordinal
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:javax.swing.JButton:setText
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:javax.swing.JButton:setEnabled
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:equals
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:getReportStatus
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:errorStatusChanged
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.lang.String:equals
    //#unanalyzed(void uncaughtException(Thread, Throwable)): Effects-of-calling:java.util.Arrays:equals
    }
    //#DMDircExceptionHandler.java:39: end of method: void com.dmdirc.logger.DMDircExceptionHandler.uncaughtException(Thread, Throwable)
}
    //#output(com.dmdirc.logger.DMDircExceptionHandler__static_init): __Descendant_Table[com/dmdirc/logger/DMDircExceptionHandler]
    //#output(com.dmdirc.logger.DMDircExceptionHandler__static_init): __Dispatch_Table.uncaughtException(Ljava/lang/Thread;Ljava/lang/Throwable;)V
    //#post(com.dmdirc.logger.DMDircExceptionHandler__static_init): __Descendant_Table[com/dmdirc/logger/DMDircExceptionHandler] == &__Dispatch_Table
    //#post(com.dmdirc.logger.DMDircExceptionHandler__static_init): __Dispatch_Table.uncaughtException(Ljava/lang/Thread;Ljava/lang/Throwable;)V == &uncaughtException
    //#DMDircExceptionHandler.java:: end of method: com.dmdirc.logger.DMDircExceptionHandler.com.dmdirc.logger.DMDircExceptionHandler__static_init
    //#DMDircExceptionHandler.java:: end of class: com.dmdirc.logger.DMDircExceptionHandler
