Ejemplo n.º 1
0
 /**
  * Constructor
  *
  * @param string $message
  * @param int $code
  * @param Exception $previous OPTIONAL Previous exception
  * @return iMSCP_Exception_Production
  */
 public function __construct($message = '', $code = 0, $previous = null)
 {
     if (function_exists('tr') && iMSCP_Registry::isRegistered('Pdo')) {
         $message = tr('An unexpected error occurred. Please contact your administrator.');
     } else {
         $message = 'An unexpected error occurred. Please contact your administrator.';
     }
     parent::__construct($message, $code, $previous);
 }
Ejemplo n.º 2
0
 /**
  * Constructor
  *
  * @param string $msg Exception Message
  * @param string $query query Last query executed
  * @param int $code Exception code
  * @param Exception $previous OPTIONAL Previous exception
  */
 public function __construct($msg = '', $query = null, $code = 0, Exception $previous = null)
 {
     $this->query = (string) preg_replace("/[\t\n]+/", ' ', $query);
     parent::__construct($msg, $code, $previous);
 }