mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-06-01 09:19:09 -04:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user