Create and throw the exception, instead of logging. The theory behind

exceptions is that they only need to be logged if they can't be caught
and handled.  If we don't throw it, then the error gets swallowed and
the code that errored out just blithely continues.
This commit is contained in:
Bharat Mediratta
2009-09-28 21:05:07 -07:00
parent a0a62a0992
commit dd5471b860

View File

@@ -24,9 +24,7 @@ class gallery_error_Core {
}
if (error_reporting() & $severity) {
$e = new ErrorException($message, 0, $severity, $filename, $lineno);
log::error("error", $e->getMessage());
Kohana::log("error", $e->__toString());
throw new ErrorException($message, 0, $severity, $filename, $lineno);
}
}
}