Example #1
0
 /**
  * Masks an exception with the called class. This should catch fatal and php errors.
  * It should always be followed by the unmask() method to remove the mask.
  * @param string $message Error message.
  * @param int $code Error code.
  * @return void
  */
 public static function mask($message = null, $code = 0)
 {
     $calledClass = get_called_class();
     $exception = new $calledClass($message, $code);
     ErrorHandler::applyMask($exception);
 }