summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-09-28 21:05:07 -0700
committerBharat Mediratta <bharat@menalto.com>2009-09-28 21:21:05 -0700
commitdd5471b8600a9a6efbfbfab81972db59e512493a (patch)
treeac11a9980f7f6dd9e03a72f4bb6105b685f3aa9b
parenta0a62a09922d855cd87d35ccc42ea7cf407a8df7 (diff)
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.
-rw-r--r--modules/gallery/helpers/gallery_error.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/gallery/helpers/gallery_error.php b/modules/gallery/helpers/gallery_error.php
index 39568c93..551f8c63 100644
--- a/modules/gallery/helpers/gallery_error.php
+++ b/modules/gallery/helpers/gallery_error.php
@@ -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);
}
}
} \ No newline at end of file