diff options
| author | Alexander Gavrilov | 2012-04-29 21:07:39 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-04-29 21:07:39 +0400 |
| commit | 2303a25bdefab30bea67f32d27d35e5002448e8a (patch) | |
| tree | d5f8ac14a823a504ad64ae30cc0fa2515f410485 /library/LuaTypes.cpp | |
| parent | 9c94b7c1e748743309dae75ec95e374f26624d5f (diff) | |
| download | dfhack-2303a25bdefab30bea67f32d27d35e5002448e8a.tar.gz dfhack-2303a25bdefab30bea67f32d27d35e5002448e8a.tar.bz2 dfhack-2303a25bdefab30bea67f32d27d35e5002448e8a.tar.xz | |
Implement unconstructed building instance creation and linking into world.
For more flexibility, the base api is split into 3 phases:
alloc, setSize, and construct. No support for non-actual
buildings like stockpiles and activity zones at the moment.
Diffstat (limited to 'library/LuaTypes.cpp')
| -rw-r--r-- | library/LuaTypes.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/library/LuaTypes.cpp b/library/LuaTypes.cpp index b4a4f5d4..02a89f9e 100644 --- a/library/LuaTypes.cpp +++ b/library/LuaTypes.cpp @@ -1029,6 +1029,11 @@ int LuaWrapper::method_wrapper_core(lua_State *state, function_identity_base *id std::string tmp = stl_sprintf("NULL pointer: %s", vn ? vn : "?"); field_error(state, UPVAL_METHOD_NAME, tmp.c_str(), "invoke"); } + catch (Error::InvalidArgument &e) { + const char *vn = e.expr(); + std::string tmp = stl_sprintf("Invalid argument; expected: %s", vn ? vn : "?"); + field_error(state, UPVAL_METHOD_NAME, tmp.c_str(), "invoke"); + } catch (std::exception &e) { std::string tmp = stl_sprintf("C++ exception: %s", e.what()); field_error(state, UPVAL_METHOD_NAME, tmp.c_str(), "invoke"); |
