Example #1
0
 /**
  * Raises an error.  In >= PHP5, this will throw an exception. In PHP4,
  * this will trigger a user error.
  *
  * @param string $msg
  * @param integer $type  One of the PHP Error Constants (E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE)
  *
  * @link http://www.php.net/manual/en/ref.errorfunc.php#errorfunc.constants
  * @todo support PHP5 exceptions without causing a syntax error.  Probably should use factory pattern and instantiate a different class depending on PHP version
  *
  * @static
  */
 function raiseError($msg, $type = E_USER_WARNING)
 {
     /*if (version_compare( PHP_VERSION, '5', '<' )) {
     			Inspekt_Error::raiseErrorPHP4($msg, $type);
     		} else {
     			throw new Exception($msg, $type);
     		}*/
     Inspekt_Error::raiseErrorPHP4($msg, $type);
 }