summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
index d612f3c9..c7e1b7b7 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
@@ -173,8 +173,13 @@ public class PositioningComposite extends StateComposite {
.map(FileChannel.MapMode.READ_ONLY, 0, chan.size());
chan.close();
rafile.close();
-
- this.pdf = new PDFFile(buf);
+ try
+ {
+ this.pdf = new PDFFile(buf);
+ }
+ catch (IOException e) {
+ throw new IOException(Messages.getString("error.MayNotBeAPDF"), e); //$NON-NLS-1$
+ }
if (this.viewer == null) {
this.viewer = new SignaturePanel(this.pdf);
this.frame.add(this.viewer);