aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_security.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/cpp_api/s_security.h')
-rw-r--r--src/script/cpp_api/s_security.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/script/cpp_api/s_security.h b/src/script/cpp_api/s_security.h
index 4a4389cf5..97bc5c067 100644
--- a/src/script/cpp_api/s_security.h
+++ b/src/script/cpp_api/s_security.h
@@ -25,9 +25,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define CHECK_SECURE_PATH(L, path) \
if (!ScriptApiSecurity::checkPath(L, path)) { \
- lua_pushstring(L, (std::string("Attempt to access external file ") + \
- path + " with mod security on.").c_str()); \
- lua_error(L); \
+ throw LuaError(std::string("Attempt to access external file ") + \
+ path + " with mod security on."); \
}
#define CHECK_SECURE_PATH_OPTIONAL(L, path) \
if (ScriptApiSecurity::isSecure(L)) { \