X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fexceptions%2Fdatabase%2Fgeneral%2Fclass_DatabaseUpdateSupportException.php;fp=inc%2Fclasses%2Fexceptions%2Fdatabase%2Fgeneral%2Fclass_DatabaseUpdateSupportException.php;h=637b9629fe4347a8cf2023c25bf240e6d5baaa4b;hb=9aa87152298f44bf6ed5a50e952fbae993a46c3a;hp=0000000000000000000000000000000000000000;hpb=301ba94813e926adae38c46bf0123d9c0da31084;p=shipsimu.git diff --git a/inc/classes/exceptions/database/general/class_DatabaseUpdateSupportException.php b/inc/classes/exceptions/database/general/class_DatabaseUpdateSupportException.php new file mode 100644 index 0000000..637b962 --- /dev/null +++ b/inc/classes/exceptions/database/general/class_DatabaseUpdateSupportException.php @@ -0,0 +1,45 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @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 DatabaseUpdateSupportException extends DatabaseException { + /** + * The constructor + * + * @param $class Class trying the invalid database update + * @param $code Code number for the exception + * @return void + */ + public function __construct (FrameworkInterface $class, $code) { + // Generate message + $message = sprintf("[%s:%d] Database updated not allowed for this class.", + $class->__toString(), + $this->getLine() + ); + + // Just call the parent constructor + parent::__construct($message, $code); + } +} + +// [EOF] +?>