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

31 lines
760 B
C++

/////////////////////////////////////////////////////////////////
//
// TRACEBACK ROUTINES
//
// The following routines are meant to help produce good-quality
// tracebacks from errors in lua code.
//
/////////////////////////////////////////////////////////////////
#ifndef TRACEBACK_HPP
#define TRACEBACK_HPP
#include "luastack.hpp"
// traceback_coroutine
//
// Given a coroutine which contains an error message, pop the error
// message from the coroutine, and push a traceback onto L.
//
void traceback_coroutine(lua_State *L, lua_State *CO);
// traceback_pcall
//
// same as lua_pcall, except that it automatically supplies traceback_handler as
// a message handler.
//
int traceback_pcall(lua_State *L, int narg, int nret);
#endif // TRACEBACK_HPP