Files
Paradise/code/__DEFINES/error_handler.dm
Krausus 30517a9b10 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
2016-06-19 12:53:07 -04:00

10 lines
467 B
Plaintext

// Settings for the error handler and error viewer
#define ERROR_COOLDOWN 600 // The "cooldown" time for each occurrence of a unique error
#define ERROR_LIMIT 9 // How many occurrences before the next will silence them
#define ERROR_MAX_COOLDOWN (ERROR_COOLDOWN * ERROR_LIMIT)
#define ERROR_SILENCE_TIME 6000 // How long a unique error will be silenced for
// How long to wait between messaging admins about occurrences of a unique error
#define ERROR_MSG_DELAY 50