mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 07:27:57 +01:00
Adds Error Handling and Realtime Runtime Reviewal (#4679)
* Adds Error Handler Adds a /world/Error proc to handle runtime errors. This proc replaces the normal runtime logging behavior, providing the following improvements: - Adds timestamps to runtimes - Pads or omits certain lines - Continues logging runtimes after the 99th (with less info, as provided by BYOND) - Adds ckey and accurate xyz to usr info - Continues including usr info after 19th runtime - Silences spammy runtimes (by default, a runtime that occurs 10 times in 10 minutes gets ignored for the next 10 minutes) * Adds runtime viewer Also fixes a minor mistake in the error handler * Sanitizes HTML in Error Viewer Also removes the stray return from the end of the error handler * Prettifies Error Viewer Now uses browser datum and some extra bits of formatting, inspired by the changes made by @PJB3005 * Error Handling Improvements - Skipped error counts now show up in the error viewer - Proper runtimes caught by a process are now sent to the main error handler - The error handler and viewer can now handle a provided src, such as one from a processing runtime - Moved some info generation into helper procs
This commit is contained in:
@@ -158,7 +158,8 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/cinematic,
|
||||
/proc/machine_upgrade,
|
||||
/client/proc/map_template_load,
|
||||
/client/proc/map_template_upload
|
||||
/client/proc/map_template_upload,
|
||||
/client/proc/view_runtimes
|
||||
)
|
||||
var/list/admin_verbs_possess = list(
|
||||
/proc/possess,
|
||||
|
||||
@@ -2930,6 +2930,16 @@
|
||||
Secrets(usr)
|
||||
return 1
|
||||
|
||||
else if(href_list["viewruntime"])
|
||||
var/datum/ErrorViewer/error_viewer = locate(href_list["viewruntime"])
|
||||
if(!istype(error_viewer))
|
||||
to_chat(usr, "<span class='warning'>That runtime viewer no longer exists.</span>")
|
||||
return
|
||||
if(href_list["viewruntime_backto"])
|
||||
error_viewer.showTo(usr, locate(href_list["viewruntime_backto"]), href_list["viewruntime_linear"])
|
||||
else
|
||||
error_viewer.showTo(usr, null, href_list["viewruntime_linear"])
|
||||
|
||||
/proc/admin_jump_link(var/atom/target, var/source)
|
||||
if(!target) return
|
||||
// The way admin jump links handle their src is weirdly inconsistent...
|
||||
|
||||
@@ -1234,3 +1234,13 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
|
||||
// Clear the user's cache so they get resent.
|
||||
usr.client.cache = list()
|
||||
|
||||
/client/proc/view_runtimes()
|
||||
set category = "Debug"
|
||||
set name = "View Runtimes"
|
||||
set desc = "Open the Runtime Viewer"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
error_cache.showTo(usr)
|
||||
|
||||
Reference in New Issue
Block a user