summaryrefslogtreecommitdiffstats
path: root/application/errors
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-09-18 17:07:41 +0200
committerFlorian Pritz <bluewind@xinu.at>2014-09-20 19:31:42 +0200
commite48be5ef7c6b73e51ab297c55950180261b6c061 (patch)
treea2dd6987158b833c900332f32d4e92d9023444d6 /application/errors
parentd2c309aee8189a5d6c2a3fcb0a05ea694d7b646e (diff)
Improve handling of PHP errors
This converts any error (including INFO, NOTICE and those hidden with @) to an exception and displays a nice error page for uncaught exceptions. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/errors')
-rw-r--r--application/errors/error_general.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/application/errors/error_general.php b/application/errors/error_general.php
index be495e4f6..844dfb74d 100644
--- a/application/errors/error_general.php
+++ b/application/errors/error_general.php
@@ -43,6 +43,9 @@ if (class_exists("CI_Controller") && !isset($GLOBALS["is_error_page"])) {
<?php
include 'application/views/footer.php';
+} elseif (php_sapi_name() === 'cli' OR defined('STDIN')) {
+ echo "$heading\n";
+ echo str_replace("<br>", "\n", $message);
} else {
// default CI error page
?>
@@ -96,7 +99,7 @@ code {
-webkit-box-shadow: 0 0 8px #D0D0D0;
}
-p {
+p, div {
margin: 12px 15px 12px 15px;
}
</style>