Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#4524 closed defect (fixed)

Exception handling in PleaseWaitRunnable

Reported by: bastiK Owned by: team
Priority: normal Component: Core
Version: Keywords:
Cc:

Description

In the PleaseWaitRunnable code the parameter ignoreException has the description If true, exception will be propagated to calling code.

However this is not true, the Exceptions are really ignored, i.e. simply dropped. The following code demonstrates the problem: It does not lead to any visible Exception.

    Main.worker.submit(new Runnable() {
        public final void run() {
            throw new RuntimeException();
       }
    });

In this thread they have a view ways to catch exceptions in such a case:
http://stackoverflow.com/questions/1687977/how-to-properly-catch-runtimeexceptions-from-executors

Currently we catch all exceptions inside the Runnable. There are two kinds of Exceptions: (1) Errors that are expected (Parse error, io error) and (2) Coding errors. (1) should lead to a simple message box and (2) should open the bug report window.

Currently this is not the case: All errors except RuntimeException get a simple message box.

Attachments (0)

Change History (4)

comment:1 in reply to: ↑ description ; follow-up: Changed 3 years ago by anonymous

The comment also says - When this runnable is executed using executor framework then use false unless you read result of task (because exception will get lost if you don't).

If ignoreException is set to false, exception will be caught and rethrown in EDT.

comment:2 in reply to: ↑ 1 Changed 3 years ago by bastiK

Replying to anonymous:

The comment also says - When this runnable is executed using executor framework then use false unless you read result of task (because exception will get lost if you don't).

First part I agree.

If ignoreException is set to false, exception will be caught and rethrown in EDT.

Maybe this used to be the case, but currently it just shows a message box:

line 127:
            // Exception has to thrown in EDT to be shown to user
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    ExceptionDialogUtil.explainException(ex);
                }
            });

comment:3 Changed 3 years ago by jttt

  • Resolution set to fixed
  • Status changed from new to closed

(In [2984]) Fix #4524 Exception handling in PleaseWaitRunnable

comment:4 Changed 3 years ago by jttt

I've changed it in ExceptionDialogUtil to show bug report dialog when unknown exception is thrown.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.