|
|
@@ -115,13 +115,9 @@ class pQuery {
|
|
|
*/
|
|
|
static function error($error /* , $arg1, $arg2... */) {
|
|
|
$args = func_get_args();
|
|
|
+ $error = nl2br(call_user_func_array('sprintf', $args));
|
|
|
|
|
|
- if( DEBUG ) {
|
|
|
- echo nl2br(call_user_func_array('sprintf', $args));
|
|
|
- //echo debug_backtrace();
|
|
|
- }
|
|
|
-
|
|
|
- pQueryConfig::ERROR_IS_FATAL && exit;
|
|
|
+ throw new pQueryException($error);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -257,6 +253,13 @@ class pQuery {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * Exception class for error throwing
|
|
|
+ */
|
|
|
+class pQueryException extends Exception {
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* Interface used for extending the jQuery class.
|
|
|
*/
|