Skip to content

Commit 0a1f02f

Browse files
committed
PDFBOX-5660: Sonar fix
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1932640 13f79535-47bb-0310-9956-ffa450edef68
1 parent e66b30b commit 0a1f02f

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

debugger/src/main/java/org/apache/pdfbox/debugger/ui/OSXAdapter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ public Object invoke(Object proxy, Method method, Object[] args)
118118
});
119119
setQuitHandlerMethod.invoke(desktopObject, osxAdapterProxy);
120120
}
121-
catch (Exception e)
121+
catch (Exception ex)
122122
{
123-
e.printStackTrace();
123+
new ErrorDialog(ex).setVisible(true);
124124
}
125125
return;
126126
}
@@ -203,9 +203,9 @@ public boolean callTarget(Object openFilesEvent)
203203
});
204204
setOpenFileHandlerMethod.invoke(desktopObject, osxAdapterProxy);
205205
}
206-
catch (Exception e)
206+
catch (Exception ex)
207207
{
208-
e.printStackTrace();
208+
new ErrorDialog(ex).setVisible(true);
209209
}
210210
return;
211211
}

debugger/src/main/java/org/apache/pdfbox/debugger/ui/Tree.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ private JMenuItem getRawStreamSaveMenu(final COSStream cosStream)
172172
byte[] bytes = in.readAllBytes();
173173
saveStream(bytes, null, null);
174174
}
175-
catch (IOException e)
175+
catch (IOException ex)
176176
{
177-
e.printStackTrace();
177+
new ErrorDialog(ex).setVisible(true);
178178
}
179179
});
180180
return saveMenuItem;
@@ -251,9 +251,9 @@ private JMenuItem getStreamSaveMenu(final COSStream cosStream, final TreePath no
251251
byte[] bytes = in.readAllBytes();
252252
saveStream(bytes, fileFilter, extension);
253253
}
254-
catch (IOException e)
254+
catch (IOException ex)
255255
{
256-
e.printStackTrace();
256+
new ErrorDialog(ex).setVisible(true);
257257
}
258258
});
259259
return saveMenuItem;
@@ -304,9 +304,9 @@ private JMenuItem getFileOpenMenu(final COSStream cosStream, final TreePath node
304304
}
305305
Desktop.getDesktop().open(temp);
306306
}
307-
catch (IOException e)
307+
catch (IOException ex)
308308
{
309-
e.printStackTrace();
309+
new ErrorDialog(ex).setVisible(true);
310310
}
311311
});
312312
return openMenuItem;
@@ -353,9 +353,9 @@ private JMenuItem getPartialStreamSavingMenuItem(final int indexOfStopFilter, fi
353353
InputStream data = stream.createInputStream(stopFilters);
354354
saveStream(data.readAllBytes(), null, null);
355355
}
356-
catch (IOException e)
356+
catch (IOException ex)
357357
{
358-
e.printStackTrace();
358+
new ErrorDialog(ex).setVisible(true);
359359
}
360360
});
361361
return menuItem;

0 commit comments

Comments
 (0)