Example #1
0
 /**
  * Creates a XML_CSSML error object, extending the PEAR_Error class
  *
  * @param int   $code the xpath error code
  * @param int   $mode (optional) the reaction either return, die or trigger/callback
  * @param int   $level (optional) intensity of the error (PHP error code)
  * @param mixed $debuginfo (optional) information that can inform user as to nature of error
  *
  * @access private
  */
 function XML_CSSML_Error($code = XML_CSSML_ERROR, $mode = PEAR_ERROR_RETURN, $level = E_USER_NOTICE, $debuginfo = null)
 {
     if (is_int($code)) {
         $this->PEAR_Error(XML_CSSML::errorMessage($code), $code, $mode, $level, $debuginfo);
     } else {
         $this->PEAR_Error("Invalid error code: {$code}", XML_CSSML_ERROR, $mode, $level, $debuginfo);
     }
 }