nngn
Loading...
Searching...
No Matches
traceback.h
Go to the documentation of this file.
1
5#ifndef NNGN_LUA_TRACEBACK_H
6#define NNGN_LUA_TRACEBACK_H
7
8#include <ostream>
9
10struct lua_State;
11
12namespace nngn::lua {
13
19class traceback {
20public:
22 explicit traceback(lua_State *L_) noexcept : L{L_} {}
24 std::string str(void) const;
26 friend std::ostream &operator<<(std::ostream &os, const traceback &t);
27private:
28 lua_State *L;
29};
30
31}
32
33#endif
Type used to output the Lua call stack.
Definition traceback.h:19
std::string str(void) const
Creates a back trace as a string object.
Definition traceback.cpp:17
lua_State * L
Definition traceback.h:28
friend std::ostream & operator<<(std::ostream &os, const traceback &t)
Writes the back trace to an output stream.
Definition traceback.cpp:10
traceback(lua_State *L_) noexcept
Initializes an object, stores the state.
Definition traceback.h:22
Definition lua_audio.cpp:19