From: Davide Franco Date: Sun, 17 Jul 2011 19:59:15 +0000 (+0200) Subject: bacula-web: New raiseError() function in CDBError class X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=460ace0d546f04adf20c7efd39cd951179cdf2f8;p=bacula%2Fbacula bacula-web: New raiseError() function in CDBError class --- diff --git a/gui/bacula-web/includes/db/cdberror.class.php b/gui/bacula-web/includes/db/cdberror.class.php index d3ea3906ba..3557ef6822 100644 --- a/gui/bacula-web/includes/db/cdberror.class.php +++ b/gui/bacula-web/includes/db/cdberror.class.php @@ -1,23 +1,14 @@ debug_level = $debug; - $this->message = $message; - - $this->raiseError(); - die(); - } - - public function raiseError() + static public function raiseError( $exception ) { echo '

Dabase error:

'; - echo 'Message: ' . $this->getMessage() . '
'; - echo 'Code: ' . $this->getCode() . '
'; - echo 'Line: ' . $this->getLine() . '
'; - echo 'File: ' . $this->getFile() . '
'; + echo 'Message: ' . $exception->getMessage() . '
'; + echo 'Code: ' . $exception->getCode() . '
'; + echo 'Line: ' . $exception->getLine() . '
'; + echo 'File: ' . $exception->getFile() . '
'; } }