32 #if !defined(LUTOK_EXCEPTIONS_HPP)
33 #define LUTOK_EXCEPTIONS_HPP
45 class error :
public std::runtime_error {
47 explicit error(
const std::string&);
48 virtual ~error(
void)
throw();
58 explicit api_error(
const std::string&,
const std::string&);
76 const
std::
string& filename(
void) const;
83 #endif // !defined(LUTOK_EXCEPTIONS_HPP)
error(const std::string &)
Constructs a new error with a plain-text message.
Definition: exceptions.cpp:41
api_error(const std::string &, const std::string &)
Constructs a new error.
Definition: exceptions.cpp:57
File not found error.
Definition: exceptions.hpp:68
virtual ~error(void)
Destructor for the error.
Definition: exceptions.cpp:48
A RAII model for the Lua state.
Definition: state.hpp:76
static api_error from_stack(state &, const std::string &)
Constructs a new api_error with the message on the top of the Lua stack.
Definition: exceptions.cpp:81
std::string _api_function
Name of the Lua C API function that caused the error.
Definition: exceptions.hpp:55
Base exception for lua errors.
Definition: exceptions.hpp:45
const std::string & api_function(void) const
Gets the name of the Lua API function that caused this error.
Definition: exceptions.cpp:96
virtual ~api_error(void)
Destructor for the error.
Definition: exceptions.cpp:66
std::string _filename
Name of the not-found file.
Definition: exceptions.hpp:70
Exception for errors raised by the Lua API library.
Definition: exceptions.hpp:53
Definition: c_gate.hpp:37