]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15249 error status codes for exceptions and notices
authorskodak <skodak>
Wed, 27 May 2009 08:34:04 +0000 (08:34 +0000)
committerskodak <skodak>
Wed, 27 May 2009 08:34:04 +0000 (08:34 +0000)
lib/weblib.php

index d5508d10d9550aad2a4c47f3ce22249a2f29fbac..c484734512482f668c25e4af4ccfac5e4551f8d2 100644 (file)
@@ -5976,7 +5976,7 @@ function _print_normal_error($errorcode, $module, $a, $link, $backtrace, $debugi
                 notify('Stack trace:'.print_backtrace($backtrace, true), 'notifytiny');
             }
         }
-        die;
+        exit(1); // general error code
     }
 
     if (empty($link) and !defined('ADMIN_EXT_HEADER_PRINTED')) {
@@ -6035,7 +6035,7 @@ function _print_normal_error($errorcode, $module, $a, $link, $backtrace, $debugi
     for ($i=0;$i<512;$i++) {  // Padding to help IE work with 404
         echo ' ';
     }
-    die;
+    exit(1); // general error code
 }
 
 /**
@@ -6095,7 +6095,7 @@ function _print_early_error($errorcode, $module, $a, $backtrace=null, $debuginfo
     }
 
     echo '</body></html>';
-    die;
+    exit(1); // general error code
 }
 
 /**
@@ -6339,7 +6339,7 @@ function notice ($message, $link='', $course=NULL) {
 
     if (CLI_SCRIPT) {
         echo("!!$message!!\n");
-        die;
+        exit(1); // no success
     }
 
     if (!$PAGE->headerprinted) {
@@ -6357,7 +6357,7 @@ function notice ($message, $link='', $course=NULL) {
     } else {
         print_footer($course);
     }
-    exit;
+    exit(1); // general error code
 }
 
 /**