I upgraded to the latest weekly (as of 1/31) and added that code in. Here's what I get:
[01-Feb-2013 17:26:46 UTC] Default exception handler: error/generatingstacktrace Debug:
Error code: generatingstacktrace
$a contents:
* line 1096 of \lib\modinfolib.php: moodle_exception thrown
* line 1072 of \lib\modinfolib.php: call to cm_info->update_user_visible()
* line 327 of \lib\modinfolib.php: call to cm_info->obtain_dynamic_data()
* line 1261 of \lib\modinfolib.php: call to course_modinfo->__construct()
* line 1928 of \lib\navigationlib.php: call to get_fast_modinfo()
* line 1989 of \lib\navigationlib.php: call to global_navigation->generate_sections_and_activities()
* line 47 of \course\format\topics\lib.php: call to global_navigation->load_generic_course_sections()
* line 1903 of \lib\navigationlib.php: call to callback_topics_load_content()
* line 1257 of \lib\navigationlib.php: call to global_navigation->load_course_sections()
* line 3043 of \lib\navigationlib.php: call to global_navigation->initialise()
* line 781 of \lib\pagelib.php: call to navbar->has_items()
* line 4 of \theme\leatherbound\layout\general.php: call to moodle_page->has_navbar()
* line 768 of \lib\outputrenderers.php: call to include()
* line 715 of \lib\outputrenderers.php: call to core_renderer->render_page_layout()
* line 232 of \course\view.php: call to core_renderer->header()
Also, here's what I got before I added that in:
[01-Feb-2013 17:22:47 UTC] Default exception handler: Coding error detected, it must be fixed by a programmer: PHP catchable fatal error Debug: Argument 2 passed to has_capability() must be an instance of context, boolean given, called in C:\inetpub\wwwroot\lib\modinfolib.php on line 1097 and defined
Error code: codingerror
* line 397 of \lib\setuplib.php: coding_exception thrown
* line 355 of \lib\accesslib.php: call to default_error_handler()
* line 1097 of \lib\modinfolib.php: call to has_capability()
* line 1072 of \lib\modinfolib.php: call to cm_info->update_user_visible()
* line 327 of \lib\modinfolib.php: call to cm_info->obtain_dynamic_data()
* line 1260 of \lib\modinfolib.php: call to course_modinfo->__construct()
* line 1928 of \lib\navigationlib.php: call to get_fast_modinfo()
* line 1989 of \lib\navigationlib.php: call to global_navigation->generate_sections_and_activities()
* line 47 of \course\format\topics\lib.php: call to global_navigation->load_generic_course_sections()
* line 1903 of \lib\navigationlib.php: call to callback_topics_load_content()
* line 1257 of \lib\navigationlib.php: call to global_navigation->load_course_sections()
* line 3043 of \lib\navigationlib.php: call to global_navigation->initialise()
* line 781 of \lib\pagelib.php: call to navbar->has_items()
* line 4 of \theme\leatherbound\layout\general.php: call to moodle_page->has_navbar()
* line 768 of \lib\outputrenderers.php: call to include()
* line 715 of \lib\outputrenderers.php: call to core_renderer->render_page_layout()
* line 232 of \course\view.php: call to core_renderer->header()
One more thing, the only other error that I can see now (at least since upgrading to the 1/31 build) is a ton of Permission Denied errors like (all referring to line 6594 in moodlelib.php:
[01-Feb-2013 17:22:47 UTC] PHP Warning: file_put_contents(C:\moodledata/cache/lang/en/core_debug.php): failed to open stream: Permission denied in C:\inetpub\wwwroot\lib\moodlelib.php on line 6594