From 09033835c5b43b93c74153690463a0a89fac5b69 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 31 Oct 2012 16:37:00 +0000 Subject: Add a common base class for all Exceptions git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12757 3a0b52a2-8410-0410-bc02-ff6273a87459 --- .../gui/exceptions/InitializationException.java | 2 +- .../pdfover/gui/exceptions/InvalidEmblemFile.java | 2 +- .../gui/exceptions/InvalidNumberException.java | 2 +- .../gui/exceptions/InvalidPasswordException.java | 2 +- .../gui/exceptions/InvalidPortException.java | 2 +- .../OutputfolderNotADirectoryException.java | 5 +- .../gui/exceptions/PDFOverGUIException.java | 58 ++++++++++++++++++++++ .../pdfover/gui/exceptions/ResumableException.java | 2 +- 8 files changed, 65 insertions(+), 10 deletions(-) create mode 100644 trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PDFOverGUIException.java (limited to 'trunk/pdf-over-gui/src/main/java') diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InitializationException.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InitializationException.java index d54b5d0b..ed96d06e 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InitializationException.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InitializationException.java @@ -18,7 +18,7 @@ package at.asit.pdfover.gui.exceptions; /** * */ -public class InitializationException extends Exception { +public class InitializationException extends PDFOverGUIException { /** * */ diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java index bcf853c0..0657da7c 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java @@ -23,7 +23,7 @@ import at.asit.pdfover.gui.Messages; /** * */ -public class InvalidEmblemFile extends Exception { +public class InvalidEmblemFile extends PDFOverGUIException { /** * */ diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidNumberException.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidNumberException.java index 467ff327..c373a423 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidNumberException.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidNumberException.java @@ -20,7 +20,7 @@ package at.asit.pdfover.gui.exceptions; /** * */ -public class InvalidNumberException extends Exception { +public class InvalidNumberException extends PDFOverGUIException { /** * */ diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPasswordException.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPasswordException.java index 06bf279f..e6984a7d 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPasswordException.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPasswordException.java @@ -18,7 +18,7 @@ package at.asit.pdfover.gui.exceptions; /** * Base Class for Invalid password exceptions */ -public abstract class InvalidPasswordException extends Exception { +public abstract class InvalidPasswordException extends PDFOverGUIException { /** * 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 96240f86..3a37d3a0 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 @@ -20,7 +20,7 @@ import at.asit.pdfover.gui.Messages; /** * */ -public class InvalidPortException extends Exception { +public class InvalidPortException extends PDFOverGUIException { /** * */ diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java index 50759790..627b3133 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java @@ -24,10 +24,7 @@ import at.asit.pdfover.gui.Messages; /** * */ -/** - * - */ -public class OutputfolderNotADirectoryException extends Exception { +public class OutputfolderNotADirectoryException extends PDFOverGUIException { /** * */ diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PDFOverGUIException.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PDFOverGUIException.java new file mode 100644 index 00000000..bdfbe41d --- /dev/null +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PDFOverGUIException.java @@ -0,0 +1,58 @@ +/* + * Copyright 2012 by A-SIT, Secure Information Technology Center Austria + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://joinup.ec.europa.eu/software/page/eupl + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + */ +package at.asit.pdfover.gui.exceptions; + +/** + * Base class for GUI Exceptions + */ +public class PDFOverGUIException extends Exception { + /** + * Serial Version UID + */ + private static final long serialVersionUID = -3942861617701033882L; + + /** + * Constructor + */ + public PDFOverGUIException() { + } + + /** + * Constructor + * @param msg Exception message + */ + public PDFOverGUIException(String msg) { + super(msg); + } + + /** + * Constructor + * @param cause Exception causing this one + */ + public PDFOverGUIException(Throwable cause) { + super(cause); + } + + /** + * Constructor + * @param msg Exception message + * @param cause Exception causing this one + */ + public PDFOverGUIException(String msg, Throwable cause) { + super(msg, cause); + } + +} diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ResumableException.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ResumableException.java index 4d150b44..3b0c79c1 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ResumableException.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/ResumableException.java @@ -18,7 +18,7 @@ package at.asit.pdfover.gui.exceptions; /** * */ -public class ResumableException extends Exception { +public class ResumableException extends PDFOverGUIException { /** * -- cgit v1.2.3