From f93365c00b5400336d35c21bb43c9bf61e8f8076 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Thu, 15 Feb 2018 01:53:07 -0500 Subject: [PATCH 1/2] Fix GLOB setup runtimes not affecting the counter (#35644) --- code/modules/error_handler/error_handler.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/error_handler/error_handler.dm b/code/modules/error_handler/error_handler.dm index d0064d7f99..02bf2035b3 100644 --- a/code/modules/error_handler/error_handler.dm +++ b/code/modules/error_handler/error_handler.dm @@ -1,8 +1,10 @@ -GLOBAL_VAR_INIT(total_runtimes, 0) +GLOBAL_VAR_INIT(total_runtimes, GLOB.total_runtimes || 0) GLOBAL_VAR_INIT(total_runtimes_skipped, 0) #ifdef DEBUG /world/Error(exception/E, datum/e_src) + GLOB.total_runtimes++ + if(!istype(E)) //Something threw an unusual exception log_world("\[[time_stamp()]] Uncaught exception: [E]") return ..() @@ -32,8 +34,6 @@ GLOBAL_VAR_INIT(total_runtimes_skipped, 0) if(!error_last_seen) // A runtime is occurring too early in start-up initialization return ..() - GLOB.total_runtimes++ - var/erroruid = "[E.file][E.line]" var/last_seen = error_last_seen[erroruid] var/cooldown = error_cooldown[erroruid] || 0