diff options
Diffstat (limited to 'pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions')
4 files changed, 79 insertions, 0 deletions
diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PDFIOException.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PDFIOException.java new file mode 100644 index 00000000..57c1e7ab --- /dev/null +++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PDFIOException.java @@ -0,0 +1,20 @@ +package at.gv.egiz.pdfas.common.exceptions; + +/** + * Created with IntelliJ IDEA. + * User: afitzek + * Date: 8/28/13 + * Time: 12:04 PM + * To change this template use File | Settings | File Templates. + */ +public class PDFIOException extends PdfAsException { + + public PDFIOException(String msgId) { + super(msgId); + } + + + public PDFIOException(String msgId, Throwable e) { + super(msgId, e); + } +} diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PdfAsException.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PdfAsException.java new file mode 100644 index 00000000..e36aa082 --- /dev/null +++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PdfAsException.java @@ -0,0 +1,31 @@ +package at.gv.egiz.pdfas.common.exceptions; + +import at.gv.egiz.pdfas.common.messages.MessageResolver; + +public class PdfAsException extends Exception { + public PdfAsException() { + super(); + } + + public PdfAsException(String msgId) { + super(msgId); + } + + public PdfAsException(String msgId, Throwable e) { + super(msgId, e); + } + + @Override + public String getMessage() { + return localizeMessage(super.getMessage()); + } + + @Override + public String getLocalizedMessage() { + return localizeMessage(super.getMessage()); + } + + protected String localizeMessage(String msgId) { + return MessageResolver.resolveMessage(msgId); + } +} diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PdfAsSettingsException.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PdfAsSettingsException.java new file mode 100644 index 00000000..431ffa5d --- /dev/null +++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/PdfAsSettingsException.java @@ -0,0 +1,20 @@ +package at.gv.egiz.pdfas.common.exceptions; + +/** + * Created with IntelliJ IDEA. + * User: afitzek + * Date: 9/10/13 + * Time: 10:54 AM + * To change this template use File | Settings | File Templates. + */ +public class PdfAsSettingsException extends PdfAsException { + + public PdfAsSettingsException(String msgId) { + super(msgId); + } + + + public PdfAsSettingsException(String msgId, Throwable e) { + super(msgId, e); + } +} diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/package-info.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/package-info.java new file mode 100644 index 00000000..cfd6a993 --- /dev/null +++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/exceptions/package-info.java @@ -0,0 +1,8 @@ +/** + * + */ +/** + * @author afitzek + * + */ +package at.gv.egiz.pdfas.common.exceptions;
\ No newline at end of file |