Software /
code /
prosody
Diff
util/startup.lua @ 11050:51be24b16e8a
util.error: Allow optional tracebacks to be injected on errors
This allows extra debug info to be provided for development purposes.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 28 Aug 2020 12:40:59 +0100 |
parent | 10948:bebb384090b0 |
child | 11052:1f42b08b134f |
line wrap: on
line diff
--- a/util/startup.lua Tue Aug 25 15:59:04 2020 +0100 +++ b/util/startup.lua Fri Aug 28 12:40:59 2020 +0100 @@ -546,6 +546,10 @@ 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 @@ 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 @@ startup.read_config(); startup.init_logging(); startup.init_gc(); + startup.init_errors(); startup.sanity_check(); startup.sandbox_require(); startup.set_function_metatable();