This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 18053
Collapse All | Expand All

(-)core/src/org/netbeans/core/TopThreadGroup.java (-35 / +12 lines)
Lines 55-90 Link Here
55
        super(parent, name);
55
        super(parent, name);
56
    }
56
    }
57
57
58
    /** The method that gets called when an uncaught exception occurs.
59
    * It notifies the user via the standard IDE's exception notification
60
    * system.
61
    * @param t The Thread in which the exception occured
62
    * @param e The exception
63
    */
64
    public void uncaughtException(Thread t, Throwable e) {
58
    public void uncaughtException(Thread t, Throwable e) {
65
        if (!(e instanceof ThreadDeath)) {
59
        if (!(e instanceof ThreadDeath)
66
            //      System.err.println("UncaughtException:");
60
            // XXX(-ttran) in Sun JDK 1.3.1_01 Linux (at least) there is a bug
67
            //      e.printStackTrace();
61
            // which can cause this exception to be thrown from a helper
68
            //      if (e instanceof org.netbeans.core.execution.ExitSecurityException) return;
62
            // AWT-Selection thread
63
            && !(e instanceof IllegalMonitorStateException &&
64
                 "AWT-Selection".equals(t.getName())) // NOI18N
65
            ) {
69
            System.err.flush();
66
            System.err.flush();
70
            TopManager tm = TopManager.getDefault();
67
            TopManager tm = TopManager.getDefault();
71
            if (tm != null) {
68
            if (tm != null) {
72
                tm.notifyException(e);
69
                tm.notifyException(e);
73
            } else {
70
            } else {
74
                if (System.getProperty ("netbeans.debug.exceptions") != null) e.printStackTrace();
71
                if (System.getProperty ("netbeans.debug.exceptions") != null)
72
                    e.printStackTrace();
75
            }
73
            }
76
        }
74
        }
77
        else super.uncaughtException(t, e);
75
        else {
76
            super.uncaughtException(t, e);
77
        }
78
    }
78
    }
79
    
79
    
80
    /** Starts the execution 
81
    */
82
    public void start () {
80
    public void start () {
83
        Thread t = new Thread (this, this, "main"); // NOI18N
81
        Thread t = new Thread (this, this, "main"); // NOI18N
84
        t.start ();
82
        t.start ();
85
    }
83
    }
86
84
87
    /** Starts the thread */
88
    public void run() {
85
    public void run() {
89
        try {
86
        try {
90
            Main.main(args);
87
            Main.main(args);
Lines 93-115 Link Here
93
        }
90
        }
94
    }
91
    }
95
}
92
}
96
97
/*
98
 * Log
99
 *  8    Jaga      1.6.1.0     4/10/00  Ales Novak      #6120
100
 *  7    Gandalf   1.6         1/20/00  Petr Hamernik   rolled back
101
 *  6    Gandalf   1.5         1/19/00  Petr Nejedly    Commented out debug 
102
 *       messages
103
 *  5    Gandalf   1.4         1/13/00  Jaroslav Tulach I18N
104
 *  4    Gandalf   1.3         10/22/99 Ian Formanek    NO SEMANTIC CHANGE - Sun
105
 *       Microsystems Copyright in File Comment
106
 *  3    Gandalf   1.2         7/24/99  Ian Formanek    Printing stack trace on 
107
 *       netbeans.debug.exceptions property only
108
 *  2    Gandalf   1.1         6/8/99   Ian Formanek    ---- Package Change To 
109
 *       org.openide ----
110
 *  1    Gandalf   1.0         1/5/99   Ian Formanek    
111
 * $
112
 * Beta Change History:
113
 *  0    Tuborg    0.12        --/--/98 Jan Formanek    ThreadDeath is passed to the super in uncaughtException
114
 *  0    Tuborg    0.13        --/--/98 Ales Novak      ExitSecurityException is passed by
115
 */
(-)openide/src/org/openide/execution/ProcessExecutor.java (-6 / +6 lines)
Lines 224-230 Link Here
224
    * exec info and asks the current executor to start with that
224
    * exec info and asks the current executor to start with that
225
    * format.
225
    * format.
226
    * <P>
226
    * <P>
227
    * Subclasses can override this to achive the right behaviour, add
227
    * Subclasses can override this to achieve the right behaviour, add
228
    * system properties, own format, etc.
228
    * system properties, own format, etc.
229
    * 
229
    * 
230
    * @param info exec info 
230
    * @param info exec info 
Lines 399-407 Link Here
399
         * by execution engine finishes.
399
         * by execution engine finishes.
400
         */
400
         */
401
        public void taskFinished(Task t) {
401
        public void taskFinished(Task t) {
402
          if (fromMe != null) {
402
            if (fromMe != null) {
403
              fromMe.stop();
403
                fromMe.stop();
404
          }
404
            }
405
        }
405
        }
406
    }
406
    }
407
407
Lines 579-589 Link Here
579
            try {
579
            try {
580
                int ret = proc.waitFor();
580
                int ret = proc.waitFor();
581
                Thread.sleep(2000);  // time for copymakers
581
                Thread.sleep(2000);  // time for copymakers
582
                stop();
583
                return ret;
582
                return ret;
584
            } catch (InterruptedException e) {
583
            } catch (InterruptedException e) {
585
                return 1;   // 0 is success
584
                return 1;   // 0 is success
586
            } finally {
585
            } finally {
586
                stop();
587
                notifyFinished();
587
                notifyFinished();
588
            }
588
            }
589
        }
589
        }
Lines 594-598 Link Here
594
594
595
        public void run() {
595
        public void run() {
596
        }
596
        }
597
    } // end of ExternalProcess
597
    }
598
}
598
}

Return to bug 18053