]> git.mjollnir.org Git - moodle.git/commitdiff
Adding some extra debug output when a specific error() occurs to help track
authordefacer <defacer>
Tue, 25 Jan 2005 19:13:09 +0000 (19:13 +0000)
committerdefacer <defacer>
Tue, 25 Jan 2005 19:13:09 +0000 (19:13 +0000)
down a problem which has been reported in the forums (it is NOT a bug though).

THIS SHOULD BE REMOVED BEFORE 1.5 IS RELEASED!

lib/pagelib.php

index 4536a3f82866f385373cd1b21bf1fb66a314c89c..ea9ee147791af126014177fef4575b7e4d385c9e 100644 (file)
@@ -61,6 +61,14 @@ function page_map_class($type, $classname = NULL) {
     }
 
     if(!class_exists($mappings[$type])) {
+        print_object('Debug info - type:');
+        var_dump($type);
+        print_object('Debug info - classname:');
+        var_dump($classname);
+        print_object('Debug info - mappings:');
+        print_object($mappings);
+        print_object('Debug_backtrace():');
+        print_object(debug_backtrace());
         error('Page class mapping for id "'.$type.'" exists but class "'.$mappings[$type].'" is not defined');
     }