Changeset 3098 in josm


Ignore:
Timestamp:
2010-03-09T08:20:54+01:00 (14 years ago)
Author:
jttt
Message:

Added handler for uncaught exception in modal dialogs

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r3054 r3098  
    131131
    132132        Thread.setDefaultUncaughtExceptionHandler(new BugReportExceptionHandler());
     133        // http://stuffthathappens.com/blog/2007/10/15/one-more-note-on-uncaught-exception-handlers/
     134        System.setProperty("sun.awt.exception.handler", BugReportExceptionHandler.class.getName());
    133135
    134136        // initialize the plaform hook, and
  • trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java

    r2955 r3098  
    3636        handleException(e);
    3737    }
     38
     39    //http://stuffthathappens.com/blog/2007/10/15/one-more-note-on-uncaught-exception-handlers/
     40    public void handle(Throwable t) {
     41        handleException(t);
     42    }
     43
    3844    public static void handleException(Throwable e) {
    3945        e.printStackTrace();
     
    116122                p.add(new JMultilineLabel(
    117123                        tr("You have encountered an error in JOSM. Before you file a bug report " +
    118                            "make sure you have updated to the latest version of JOSM here:")), GBC.eol());
     124                        "make sure you have updated to the latest version of JOSM here:")), GBC.eol());
    119125                p.add(new UrlLabel("http://josm.openstreetmap.de/#Download"), GBC.eop().insets(8,0,0,0));
    120126                p.add(new JMultilineLabel(
    121127                        tr("You should also update your plugins. If neither of those help please " +
    122                            "file a bug report in our bugtracker using this link:")), GBC.eol());
     128                        "file a bug report in our bugtracker using this link:")), GBC.eol());
    123129                p.add(new UrlLabel(url.toString(), "http://josm.openstreetmap.de/josmticket?..."), GBC.eop().insets(8,0,0,0));
    124130                p.add(new JMultilineLabel(
    125131                        tr("There the error information provided below should already be " +
    126                            "filled in for you. Please include information on how to reproduce " +
    127                            "the error and try to supply as much detail as possible.")), GBC.eop());
     132                                "filled in for you. Please include information on how to reproduce " +
     133                        "the error and try to supply as much detail as possible.")), GBC.eop());
    128134                p.add(new JMultilineLabel(
    129135                        tr("Alternatively, if that does not work you can manually fill in the information " +
    130                            "below at this URL:")), GBC.eol());
     136                        "below at this URL:")), GBC.eol());
    131137                p.add(new UrlLabel("http://josm.openstreetmap.de/newticket"), GBC.eop().insets(8,0,0,0));
    132138                try {
Note: See TracChangeset for help on using the changeset viewer.