diff options
author | Matthew Wild <mwild1@gmail.com> | 2020-08-28 12:40:59 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2020-08-28 12:40:59 +0100 |
commit | 7f4e1073cd28ad524ee7d1b4d414460da0641aaf (patch) | |
tree | 49dea77a4374620ae7617ec9e488b026e23d366f /util/startup.lua | |
parent | f8c7c8fd53c24a8b9e6e487c12ce4da8673cb1a0 (diff) | |
download | prosody-7f4e1073cd28ad524ee7d1b4d414460da0641aaf.tar.gz prosody-7f4e1073cd28ad524ee7d1b4d414460da0641aaf.zip |
util.error: Allow optional tracebacks to be injected on errors
This allows extra debug info to be provided for development purposes.
Diffstat (limited to 'util/startup.lua')
-rw-r--r-- | util/startup.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/util/startup.lua b/util/startup.lua index 01ca585b..40021981 100644 --- a/util/startup.lua +++ b/util/startup.lua @@ -546,6 +546,10 @@ function startup.init_gc() return true; end +function startup.init_errors() + require "util.error".configure(config.get("*", "error_library")); +end + function startup.make_host(hostname) return { type = "local", @@ -577,6 +581,7 @@ function startup.prosodyctl() startup.force_console_logging(); startup.init_logging(); startup.init_gc(); + startup.init_errors(); startup.setup_plugindir(); -- startup.setup_plugin_install_path(); startup.setup_datadir(); @@ -600,6 +605,7 @@ function startup.prosody() startup.read_config(); startup.init_logging(); startup.init_gc(); + startup.init_errors(); startup.sanity_check(); startup.sandbox_require(); startup.set_function_metatable(); |