Example #1
0
 function __construct($message, $code, $query_error = false)
 {
     if ($query_error) {
         $this->help .= " <pre>{$query_error}</pre>";
     }
     parent::__construct($message, $code);
 }
Example #2
0
 function __construct($message, $code, $db_settings = array())
 {
     if (!$db_settings) {
         $this->help .= "<p>You have no database configured</p>";
     } else {
         $this->help .= "<pre>" . print_r($db_settings, 1) . "</pre>";
     }
     $this->help .= "<p>Check that these settings are correctly configured and try again</p>";
     parent::__construct($message, $code);
 }
Example #3
0
/************ Application Error Handling *******************************************************
*
*  When you're running in production mode, you don't want your errors displayed to users.
*  The following commands can be uncommented to handle errors professionally.
*  Firstly the routing redirect_on_error gives a location for a 404 error (page not found)
*  The second redirect_on_error is an application error page.
*  Both of these can be either actions in your application or static pages.
*  
*  Finally email_on_error accepts an email address and email_subject_on_error a text subject.
*  If these are set a copy of the error trace will be emailed to the address. */

WXRoutingException::$redirect_on_error = "/404.html"; // Page not found error

// Application Error and an email address and subject to send details to.
WXException::$redirect_on_error = "/error.html";
//WXException::$email_on_error="";
//WXException::$email_subject_on_error="";
/*********************************************************************************************/


/*********************************************************************************************/

/*********** Your Additional Application Configuration ***************************************
*  This file is run at boot time so if you want to set any systemwide configuration values, 
*  you can do so below this point */




 function __construct($message)
 {
     return parent::__construct($message, "Database Error");
 }