Changeset 10372 in josm for trunk/src/org
- Timestamp:
- 2016-06-14T18:50:32+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java
r10295 r10372 62 62 import org.openstreetmap.josm.tools.ImageProvider.ImageSizes; 63 63 import org.openstreetmap.josm.tools.LanguageInfo; 64 import org.openstreetmap.josm.tools.bugreport.BugReport; 65 import org.openstreetmap.josm.tools.bugreport.ReportedException; 64 66 65 67 /** … … 135 137 * <p> 136 138 * Passes on the exception that was thrown to the thread calling this. 137 * The exception is wrapped in a {@link RuntimeException} if it was a normal {@link Throwable}.139 * The exception is wrapped using a {@link ReportedException}. 138 140 * @param task The runnable to execute 139 141 * @see SwingUtilities#invokeAndWait … … 146 148 try { 147 149 SwingUtilities.invokeAndWait(task); 148 } catch (InterruptedException e) { 149 Main.error(e); 150 } catch (InvocationTargetException e) { 151 if (e.getCause() instanceof RuntimeException) { 152 throw (RuntimeException) e.getCause(); 153 } else { 154 throw new RuntimeException("Exception while calling " + task, e.getCause()); 155 } 150 } catch (InterruptedException | InvocationTargetException e) { 151 throw BugReport.intercept(e).put("task", task); 156 152 } 157 153 }
Note:
See TracChangeset
for help on using the changeset viewer.