Swingworker do in background method does not caught and print exceptions?

Paulo Levi i30817 at gmail.com
Mon Sep 27 18:23:13 UTC 2010

In in linux 64 bits.
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9) (6b20-1.9-0ubuntu1)
OpenJDK 64-Bit Server VM (build 17.0-b16, mixed mode)
from ubuntu repositories.

A very simple swingworker started from the EDT:

        new SwingWorker<Object, Object>() {

            protected Object doInBackground() throws Exception {
                System.out.println("SW Ran");
                throw new NullPointerException();
Only prints SW Ran.
It's surprising this was not noticed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/core-libs-dev/attachments/20100927/4d21c9d3/attachment.html>

More information about the core-libs-dev mailing list