Files
integration/luprex/syscpp/traceback.hpp

38 lines
912 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 and an error message, returns a traceback
// of the coroutine.
//
int traceback_coroutine(lua_State *L);
// traceback_handler
//
// The function 'pcall' expects you to pass in a message handler routine.
// 'traceback_handler' is designed to be used as this argument to pcall.
//
int traceback_handler(lua_State *L);
// 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