In process of adding luaconsole.cpp
This commit is contained in:
37
luprex/cpp/traceback.hpp
Normal file
37
luprex/cpp/traceback.hpp
Normal file
@@ -0,0 +1,37 @@
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 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
|
||||
Reference in New Issue
Block a user