From eddef3bbbf39aad6b6f913fc04db9ec8db150662 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Sat, 30 May 2020 00:46:30 +0200 Subject: [PATCH] add exceptions --- .../Exceptions/noBaseObjectSetException.php | 24 ++++++++++++++++++ .../Exceptions/noPdfHandlerFoundException.php | 4 +-- .../pdfGeneratorExceptionAbstract.php | 25 +++++++++++++++++++ 3 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 Application/Model/Exceptions/noBaseObjectSetException.php create mode 100644 Application/Model/Exceptions/pdfGeneratorExceptionAbstract.php diff --git a/Application/Model/Exceptions/noBaseObjectSetException.php b/Application/Model/Exceptions/noBaseObjectSetException.php new file mode 100644 index 0000000..3abc4db --- /dev/null +++ b/Application/Model/Exceptions/noBaseObjectSetException.php @@ -0,0 +1,24 @@ + + * @link http://www.oxidmodule.com + */ + +namespace D3\PdfDocuments\Application\Model\Exceptions; + +class noBaseObjectSetException extends pdfGeneratorExceptionAbstract +{ + public function __construct( $sMessage = "no base object (e.g. order) for pdf generator set", $iCode = 0, \Exception $previous = null ) + { + parent::__construct( $sMessage, $iCode, $previous ); + } +} \ No newline at end of file diff --git a/Application/Model/Exceptions/noPdfHandlerFoundException.php b/Application/Model/Exceptions/noPdfHandlerFoundException.php index beaf672..8adc14c 100644 --- a/Application/Model/Exceptions/noPdfHandlerFoundException.php +++ b/Application/Model/Exceptions/noPdfHandlerFoundException.php @@ -15,9 +15,7 @@ namespace D3\PdfDocuments\Application\Model\Exceptions; -use OxidEsales\Eshop\Core\Exception\StandardException; - -class d3noPdfHandlerFoundException extends StandardException +class noPdfHandlerFoundException extends pdfGeneratorExceptionAbstract { /** * d3noPdfHandlerFoundException constructor. diff --git a/Application/Model/Exceptions/pdfGeneratorExceptionAbstract.php b/Application/Model/Exceptions/pdfGeneratorExceptionAbstract.php new file mode 100644 index 0000000..4e8676d --- /dev/null +++ b/Application/Model/Exceptions/pdfGeneratorExceptionAbstract.php @@ -0,0 +1,25 @@ + + * @link http://www.oxidmodule.com + */ + +namespace D3\PdfDocuments\Application\Model\Exceptions; + +use OxidEsales\Eshop\Core\Exception\StandardException; + +abstract class pdfGeneratorExceptionAbstract extends StandardException +{ + +} \ No newline at end of file