31 lines
744 B
C++
31 lines
744 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, replace
|
|
// the error message with a full traceback. Always returns 1.
|
|
//
|
|
int traceback_coroutine(lua_State *L);
|
|
|
|
// traceback_pcall
|
|
//
|
|
// same as lua_pcall, except that it automatically supplies
|
|
// traceback_coroutine as a message handler.
|
|
//
|
|
int traceback_pcall(lua_State *L, int narg, int nret);
|
|
|
|
#endif // TRACEBACK_HPP
|