Files
integration/luprex/core/cpp/traceback.hpp

31 lines
741 B
C++
Raw Normal View History

2021-01-02 13:31:18 -05:00
/////////////////////////////////////////////////////////////////
//
2021-01-12 14:14:38 -05:00
// TRACEBACK ROUTINES
2021-01-02 13:31:18 -05:00
//
2021-01-12 14:14:38 -05:00
// The following routines are meant to help produce good-quality
// tracebacks from errors in lua code.
2021-01-02 13:31:18 -05:00
//
/////////////////////////////////////////////////////////////////
2021-01-12 14:14:38 -05:00
2021-01-02 13:31:18 -05:00
#ifndef TRACEBACK_HPP
#define TRACEBACK_HPP
#include "luastack.hpp"
2021-01-12 14:14:38 -05:00
// traceback_coroutine
//
// Given a coroutine which contains an error message, replace
// the error message with a full traceback. Always returns 1.
2021-01-12 14:14:38 -05:00
//
int traceback_coroutine(lua_State *L);
2021-01-12 14:14:38 -05:00
// traceback_pcall
//
// same as lua_pcall, except that it automatically supplies traceback_handler as
// a message handler.
//
2021-01-02 13:31:18 -05:00
int traceback_pcall(lua_State *L, int narg, int nret);
#endif // TRACEBACK_HPP