Search in sources :

Example 6 with ErrorDumpDialog

use of com.github.mob41.osumer.ui.ErrorDumpDialog in project osumer by mob41.

the class UpdaterRunAction method run.

@Override
public void run(Queue queue) {
    try {
        System.out.println("Starting: \"" + filePath + "\"");
        Runtime.getRuntime().exec("cmd.exe /c \"" + filePath + "\" -install");
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.exit(0);
        return;
    } catch (IOException e1) {
        e1.printStackTrace();
        DebugDump dump = new DebugDump(null, "(If[openFile] scope) (UI) Set status to lblStatus", "(Try scope) Open file loc using Desktop.getDesktop.open()", "(Try scope) Sleep 2000 ms (2 sec)", "Unable to open file", false, e1);
        DumpManager.addDump(dump);
    // TODO
    /*
            ErrorDumpDialog dialog = new ErrorDumpDialog(dump);
            dialog.setModal(true);
            dialog.setVisible(true);
            */
    }
}
Also used : IOException(java.io.IOException) DebugDump(com.github.mob41.osumer.debug.DebugDump)

Aggregations

IOException (java.io.IOException)6 DebugDump (com.github.mob41.organdebug.DebugDump)3 DebugDump (com.github.mob41.osumer.debug.DebugDump)2 ErrorDumpDialog (com.github.mob41.osumer.exceptions.ErrorDumpDialog)2 ErrorDumpDialog (com.github.mob41.osumer.ui.ErrorDumpDialog)2 AWTException (java.awt.AWTException)2 Socket (java.net.Socket)2 DebuggableException (com.github.mob41.organdebug.exceptions.DebuggableException)1 Configuration (com.github.mob41.osumer.Configuration)1 Installer (com.github.mob41.osumer.installer.Installer)1 Installer (com.github.mob41.osumer.io.Installer)1 QueueManager (com.github.mob41.osumer.io.queue.QueueManager)1 IDaemon (com.github.mob41.osumer.rmi.IDaemon)1 SockThread (com.github.mob41.osumer.sock.SockThread)1 UIFrame (com.github.mob41.osumer.ui.UIFrame)1 SystemTray (java.awt.SystemTray)1 TrayIcon (java.awt.TrayIcon)1 ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1 BufferedReader (java.io.BufferedReader)1