From 460ace0d546f04adf20c7efd39cd951179cdf2f8 Mon Sep 17 00:00:00 2001 From: Davide Franco Date: Sun, 17 Jul 2011 21:59:15 +0200 Subject: [PATCH] bacula-web: New raiseError() function in CDBError class --- gui/bacula-web/includes/db/cdberror.class.php | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) 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() . '
'; } } -- 2.39.5