Paste #59579: Error Announcer v1

Date: 2019/11/04 13:09:26 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


### Error Announcer Command
# by Mwthorn (Discord: Mwthorn#2843) (Mail: mwthorn@gmail.com)
# Ask for help at any time on the Official Denizen Script Discord: https://discord.gg/Q6pZGSR
# Sends error messages to operators through in-game chat.
# Useful when you are not reading debug from console and just want to be notified if any errors has occured.
# These messages are also displayed when debug is turned off.
# But you probably want to check console logs for further details about an error if you have debug enabled.

## Instructions:
# - Place the script in your script folder.
# - Restart server or reload scripts
# - Done!

Error_Announcer_Events:
    type: world
    debug: false
    events:
        on script generates error:
        - announce "<&c>Script Error<&co> <context.queue.script.name||null> in <context.queue.script.relative_filename||null><&nl><context.message||null>" to_ops

        on server generates exception:
        - announce "<&c>Server generated exception<&co> <context.type>" to_ops