Changeset 23327 in osm for applications/editors/josm/plugins/ext_tools/src
- Timestamp:
- 2010-09-24T16:46:00+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/ext_tools/src/ext_tools/ExtTool.java
r23126 r23327 117 117 118 118 protected void showErrorMessage(String message, String details) { 119 JPanel p = new JPanel(new GridBagLayout());119 final JPanel p = new JPanel(new GridBagLayout()); 120 120 p.add(new JMultilineLabel(message),GBC.eol()); 121 121 if (details != null) { … … 125 125 p.add(new JScrollPane(info), GBC.eop()); 126 126 } 127 JOptionPane.showMessageDialog(Main.parent, p, tr("External tool error"), JOptionPane.ERROR_MESSAGE); 127 SwingUtilities.invokeLater(new Runnable() { 128 public void run() { 129 JOptionPane.showMessageDialog(Main.parent, p, tr("External tool error"), JOptionPane.ERROR_MESSAGE); 130 } 131 }); 128 132 } 129 133 … … 167 171 try { 168 172 tp.process = builder.start(); 169 } catch (IOException e1) { 173 } catch (final IOException e) { 174 e.printStackTrace(); 175 synchronized (debugstr) { 176 showErrorMessage( 177 tr("Error executing the script:"), 178 debugstr.toString() + e.getMessage() + "\n" + e.getStackTrace()); 179 } 170 180 return; 171 181 } … … 207 217 if (tp.running) { 208 218 tp.process.destroy(); 209 SwingUtilities.invokeLater(new Runnable() { 210 public void run() { 211 synchronized (debugstr) { 212 showErrorMessage( 213 tr("Child script have returned invalid data.\n\nstderr contents:"), 214 debugstr.toString()); 215 } 216 } 217 }); 219 synchronized (debugstr) { 220 showErrorMessage( 221 tr("Child script have returned invalid data.\n\nstderr contents:"), 222 debugstr.toString()); 223 } 218 224 } 219 225 } finally {
Note:
See TracChangeset
for help on using the changeset viewer.