mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
add sol::stack::get_traceback convenience function
This commit is contained in:
parent
fe5c71e792
commit
ca293c723f
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include "trampoline.hpp"
|
||||
#include "stack.hpp"
|
||||
#include "error.hpp"
|
||||
#include "function.hpp"
|
||||
#include "object.hpp"
|
||||
#include "lua_value.hpp"
|
||||
|
@ -177,6 +178,14 @@ namespace sol {
|
|||
return script_throw_on_error(L, std::move(pfr));
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace stack {
|
||||
inline error get_traceback_or_errors(lua_State* L) {
|
||||
int p = default_traceback_error_handler(L);
|
||||
sol::error err = stack::get<sol::error>(L, -p);
|
||||
return std::move(err);
|
||||
}
|
||||
}
|
||||
} // namespace sol
|
||||
|
||||
#endif // SOL_STATE_DEFAULT_HPP
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// This file was generated with a script.
|
||||
// Generated 2019-05-26 17:50:22.004134 UTC
|
||||
// This header was generated with sol v3.0.2 (revision a49fbc2)
|
||||
// Generated 2019-05-26 19:43:41.438672 UTC
|
||||
// This header was generated with sol v3.0.2 (revision fe5c71e)
|
||||
// https://github.com/ThePhD/sol2
|
||||
|
||||
#ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// This file was generated with a script.
|
||||
// Generated 2019-05-26 17:50:20.845211 UTC
|
||||
// This header was generated with sol v3.0.2 (revision a49fbc2)
|
||||
// Generated 2019-05-26 19:43:41.120525 UTC
|
||||
// This header was generated with sol v3.0.2 (revision fe5c71e)
|
||||
// https://github.com/ThePhD/sol2
|
||||
|
||||
#ifndef SOL_SINGLE_INCLUDE_HPP
|
||||
|
@ -23980,6 +23980,14 @@ namespace sol {
|
|||
return script_throw_on_error(L, std::move(pfr));
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace stack {
|
||||
inline error get_traceback_or_errors(lua_State* L) {
|
||||
int p = default_traceback_error_handler(L);
|
||||
sol::error err = stack::get<sol::error>(L, -p);
|
||||
return std::move(err);
|
||||
}
|
||||
}
|
||||
} // namespace sol
|
||||
|
||||
// end of sol/state_handling.hpp
|
||||
|
|
Loading…
Reference in New Issue
Block a user