Author: tilman
Date: Sat Mar 28 14:14:44 2026
New Revision: 1932635
Log:
PDFBOX-5660: replace runtime throw; remove unintended quotes
Modified:
pdfbox/branches/3.0/debugger/src/main/java/org/apache/pdfbox/debugger/PDFDebugger.java
pdfbox/branches/3.0/debugger/src/main/java/org/apache/pdfbox/debugger/pagepane/PagePane.java
Modified:
pdfbox/branches/3.0/debugger/src/main/java/org/apache/pdfbox/debugger/PDFDebugger.java
==============================================================================
---
pdfbox/branches/3.0/debugger/src/main/java/org/apache/pdfbox/debugger/PDFDebugger.java
Sat Mar 28 13:52:36 2026 (r1932634)
+++
pdfbox/branches/3.0/debugger/src/main/java/org/apache/pdfbox/debugger/PDFDebugger.java
Sat Mar 28 14:14:44 2026 (r1932635)
@@ -248,7 +248,7 @@ public class PDFDebugger extends JFrame
}
else
{
- new ErrorDialog(new IllegalArgumentException("Unknown view mode: "
+ "initialViewMode")).setVisible(true);
+ new ErrorDialog(new IllegalArgumentException("Unknown view mode: "
+ initialViewMode)).setVisible(true);
}
}
@@ -362,9 +362,9 @@ public class PDFDebugger extends JFrame
configuration.load(is);
}
}
- catch(IOException e)
+ catch (IOException ex)
{
- throw new RuntimeException(e);
+ new ErrorDialog(ex).setVisible(true);
}
}
}
@@ -518,7 +518,7 @@ public class PDFDebugger extends JFrame
}
catch (NoSuchMethodException e)
{
- throw new RuntimeException(e);
+ new ErrorDialog(ex).setVisible(true);
}
}
}
@@ -546,9 +546,9 @@ public class PDFDebugger extends JFrame
{
readPDFurl(urlString, "");
}
- catch (IOException | URISyntaxException e)
+ catch (IOException | URISyntaxException ex)
{
- throw new RuntimeException(e);
+ new ErrorDialog(ex).setVisible(true);
}
});
fileMenu.add(openUrlMenuItem);
@@ -1255,9 +1255,9 @@ public class PDFDebugger extends JFrame
return new String(IOUtils.toByteArray(in));
}
}
- catch( IOException e )
+ catch (IOException ex)
{
- throw new RuntimeException(e);
+ new ErrorDialog(ex).setVisible(true);
}
}
if (selectedNode instanceof COSDictionary)
@@ -1587,9 +1587,9 @@ public class PDFDebugger extends JFrame
{
readPDFFile(filePath, "");
}
- catch (Exception e)
+ catch (Exception ex)
{
- throw new RuntimeException(e);
+ new ErrorDialog(ex).setVisible(true);
}
}
};
Modified:
pdfbox/branches/3.0/debugger/src/main/java/org/apache/pdfbox/debugger/pagepane/PagePane.java
==============================================================================
---
pdfbox/branches/3.0/debugger/src/main/java/org/apache/pdfbox/debugger/pagepane/PagePane.java
Sat Mar 28 13:52:36 2026 (r1932634)
+++
pdfbox/branches/3.0/debugger/src/main/java/org/apache/pdfbox/debugger/pagepane/PagePane.java
Sat Mar 28 14:14:44 2026 (r1932635)
@@ -578,10 +578,10 @@ public class PagePane implements ActionL
label.setIcon(new HighResolutionImageIcon(image,
label.getWidth(), label.getHeight()));
label.setText(null);
}
- catch (InterruptedException | ExecutionException e)
+ catch (InterruptedException | ExecutionException ex)
{
- label.setText(e.getMessage());
- throw new RuntimeException(e);
+ label.setText(ex.getMessage());
+ new ErrorDialog(ex).setVisible(true);
}
}
}