Example #1
0
 /**
  * 
  */
 private function _handleError($code, $message, $file = '', $line = 0, array $context = array())
 {
     if (!($code & $this->_disabledErrors)) {
         throw new Woops_Core_Php_Error_Exception(Woops_Core_Exception_Base::getExceptionString('Woops_Core_Php_Error_Exception', $code) . ': ' . $message, $code);
     }
 }
Example #2
0
 /**
  * Decides whether to display the backtrace or not when an exception is
  * not caught.
  * 
  * @param   boolean True if the backtrace must be displayed, otherwise false
  * @return  boolean The previous value
  */
 public static function setDebugState($value)
 {
     // Gets the previous state
     $oldState = self::$_debug;
     // Sets the new state
     self::$_debug = (bool) $value;
     // Returns the previous state
     return $oldState;
 }