diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-25 16:35:03 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-25 16:35:03 +0000 |
commit | c66f8a865056e7e2e8a9461d23691665b82dd59a (patch) | |
tree | 636ea6ab6b590f06a48828d8c5ff39e5827fa470 /crawl-ref/source/clua.h | |
parent | e079a2dd1b6c583624f32a097f4a946d3c6c89c7 (diff) | |
download | crawl-ref-c66f8a865056e7e2e8a9461d23691665b82dd59a.tar.gz crawl-ref-c66f8a865056e7e2e8a9461d23691665b82dd59a.zip |
Croak if necessary Lua files are missing, instead of failing subtly later.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1651 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/clua.h')
-rw-r--r-- | crawl-ref/source/clua.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/clua.h b/crawl-ref/source/clua.h index 6759687494..2fd6bf835e 100644 --- a/crawl-ref/source/clua.h +++ b/crawl-ref/source/clua.h @@ -65,7 +65,8 @@ public: int loadstring(const char *str, const char *context); int execstring(const char *str, const char *context = "init.txt"); - int execfile(const char *filename, bool trusted = false); + int execfile(const char *filename, bool trusted = false, + bool die_on_fail = false); bool callbooleanfn(bool defval, const char *fn, const char *params, ...); bool callfn(const char *fn, int nargs, int nret = 1); @@ -74,7 +75,8 @@ public: bool runhook(const char *hook, const char *params, ...); static int file_write(lua_State *ls); - static int loadfile(lua_State *ls, const char *file, bool trusted = false); + static int loadfile(lua_State *ls, const char *file, + bool trusted = false, bool die_on_fail = false); static bool is_path_safe(std::string file, bool trusted = false); public: |