Puts the custom error handler behind its own define (#40086)

* henk

* wops forgot a commit

* Update world.dm

* Update _logging.dm

* now it works, tested

* Update _compile_options.dm

* Update _compile_options.dm
This commit is contained in:
vuonojenmustaturska
2018-09-07 13:02:00 +03:00
committed by AnturK
parent 567a1bf670
commit 7504a6a776
5 changed files with 16 additions and 6 deletions
+2 -4
View File
@@ -1,8 +1,7 @@
GLOBAL_VAR_INIT(total_runtimes, GLOB.total_runtimes || 0)
GLOBAL_VAR_INIT(total_runtimes_skipped, 0)
#ifdef DEBUG
#ifdef USE_CUSTOM_ERROR_HANDLER
#define ERROR_USEFUL_LEN 2
/world/Error(exception/E, datum/e_src)
@@ -128,5 +127,4 @@ GLOBAL_VAR_INIT(total_runtimes_skipped, 0)
// This writes the regular format (unwrapping newlines and inserting timestamps as needed).
log_runtime("runtime error: [E.name]\n[E.desc]")
#endif
#endif
+2 -2
View File
@@ -7,7 +7,7 @@
// logged errors. Only one instance of this datum should ever exist, and it's
// right here:
#ifdef DEBUG
#ifdef USE_CUSTOM_ERROR_HANDLER
GLOBAL_DATUM_INIT(error_cache, /datum/error_viewer/error_cache, new)
#else
// If debugging is disabled, there's nothing useful to log, so don't bother.
@@ -192,4 +192,4 @@ GLOBAL_DATUM(error_cache, /datum/error_viewer/error_cache)
browse_to(user, html)
/datum/error_viewer/error_entry/make_link(linktext, datum/error_viewer/back_to, linear)
return is_skip_count ? name : ..()
return is_skip_count ? name : ..()