X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fexceptions%2Fbase64%2Fclass_Base64EncodingBadException.php;fp=inc%2Fclasses%2Fexceptions%2Fbase64%2Fclass_Base64EncodingBadException.php;h=239a6c90762a34a0b0db74dd0559a5bd02fd8906;hb=b532d52afc61415abf64d7ddfa7dc277884feae0;hp=0000000000000000000000000000000000000000;hpb=0088a32f8609875b6151dfa516f7c2d92fa3a5a8;p=core.git diff --git a/inc/classes/exceptions/base64/class_Base64EncodingBadException.php b/inc/classes/exceptions/base64/class_Base64EncodingBadException.php new file mode 100644 index 00000000..239a6c90 --- /dev/null +++ b/inc/classes/exceptions/base64/class_Base64EncodingBadException.php @@ -0,0 +1,47 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class Base64EncodingBadException extends FrameworkException { + /** + * The super constructor for all exceptions + * + * @param $message Error message + * @param $code Error code + * @return void + */ + public function __construct (array $messageArray, $code) { + // Construct message + $message = sprintf("[%s:%d] Raw data %s contains invalid characters for BASE64-encoding.", + $messageArray[0]->__toString(), + $this->getLine(), + $messageArray[1] + ); + + // Call parent exception constructor + parent::__construct($message, $code); + } +} + +// [EOF] +?>