Permalink
Browse files

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.
  • Loading branch information...
1 parent c9ac23b commit b26e84dfe153ddd7bf90c07940f9f349f6657960 @bharat bharat committed Sep 29, 2009
Showing with 1 addition and 3 deletions.
  1. +1 −3 modules/gallery/helpers/gallery_error.php
@@ -24,9 +24,7 @@ static function error_handler($severity, $message, $filename, $lineno) {
}
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);
}
}
}

0 comments on commit b26e84d

Please sign in to comment.