diff options
author | sfan5 <sfan5@live.de> | 2021-09-10 23:16:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-10 23:16:46 +0200 |
commit | 766e885a1b1c5afb7a62f11b427b6d135adeab87 (patch) | |
tree | 5fc2194936c5ad9702eba44c8636758645f98712 /src/server.h | |
parent | 7423c4c11e01edecd8db18b147bab4d2f3eeb471 (diff) | |
download | minetest-766e885a1b1c5afb7a62f11b427b6d135adeab87.tar.gz minetest-766e885a1b1c5afb7a62f11b427b6d135adeab87.tar.bz2 minetest-766e885a1b1c5afb7a62f11b427b6d135adeab87.zip |
Clean up/improve some scriptapi error handling code
Diffstat (limited to 'src/server.h')
-rw-r--r-- | src/server.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server.h b/src/server.h index 7b16845af..c5db0fdfb 100644 --- a/src/server.h +++ b/src/server.h @@ -300,6 +300,10 @@ public: inline void setAsyncFatalError(const std::string &error) { m_async_fatal_error.set(error); } + inline void setAsyncFatalError(const LuaError &e) + { + setAsyncFatalError(std::string("Lua: ") + e.what()); + } bool showFormspec(const char *name, const std::string &formspec, const std::string &formname); Map & getMap() { return m_env->getMap(); } |