Changeset 406 for trunk/src/lua/lua_function.cc
- Timestamp:
- 06/20/15 00:05:17 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lua/lua_function.cc
r395 r406 5 5 // For conditions of distribution and use, see copying.txt file in root folder. 6 6 7 #include <nv/lua/lua_function.hh>7 #include "nv/lua/lua_function.hh" 8 8 9 #include <nv/lua/lua_raw.hh> 9 #include "nv/core/logging.hh" 10 #include "nv/lua/lua_raw.hh" 10 11 11 12 using namespace nv; 13 14 #define NV_LUA_ABORT( func, ... ) \ 15 NV_LOG_CRITICAL( "lua::" func " : ", __VA_ARGS__ ) \ 16 NV_ABORT( "lua::" func " : critical error!" ) 12 17 13 18 lua::function_base::function_base( lua_State* a_L, const path& a_path, bool a_global /*= true*/ ) : L(a_L) … … 16 21 { 17 22 lua_pop( L, 1 ); 18 throw std::runtime_error("not a valid path - " +a_path.to_string() );23 NV_LUA_ABORT( "function_base::function_base", "not a valid path - ", a_path.to_string() ); 19 24 } 20 25 … … 22 27 { 23 28 lua_pop( L, 1 ); 24 throw std::runtime_error("not a valid function - " +a_path.to_string() );29 NV_LUA_ABORT( "function_base::function_base", "not a valid function - ", a_path.to_string() ); 25 30 } 26 31 m_ref = luaL_ref( L, LUA_REGISTRYINDEX ); … … 61 66 std::string error = lua_tostring( L, -1 ); 62 67 lua_pop( L, 1 ); 63 throw std::runtime_error(error.c_str());68 NV_LUA_ABORT( "function_base::call", "call failed - ", error.c_str() ); 64 69 } 65 70 }
Note: See TracChangeset
for help on using the changeset viewer.