diff options
Diffstat (limited to 'trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java')
-rw-r--r-- | trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java index 3a37d3a0..98b05c79 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java @@ -28,10 +28,19 @@ public class InvalidPortException extends PDFOverGUIException { /** - * Constructor - * @param port + * Constructor with an invalid port number + * @param port invalid port number */ public InvalidPortException(int port) { - super(port + Messages.getString("exception.InvalidPort") + 0xffff); //$NON-NLS-1$ + super(String.format(Messages.getString("exception.InvalidPort"), Integer.toString(port), 1, 0xffff)); //$NON-NLS-1$ + } + + /** + * Constructor with an invalid port string + * @param source InvalidNumberFormat exception + * @param portString invalid port string + */ + public InvalidPortException(String portString, Throwable source) { + super(String.format(Messages.getString("exception.InvalidPort"), portString, 1, 0xffff), source); //$NON-NLS-1$ } } |