Go to the documentation of this file.
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)
File not found error.
Definition: exceptions.hpp:68
Exception for errors raised by the Lua API library.
Definition: exceptions.hpp:53
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
const std::string & api_function(void) const
Gets the name of the Lua API function that caused this error.
Definition: exceptions.cpp:96
Base exception for lua errors.
Definition: exceptions.hpp:45
api_error(const std::string &, const std::string &)
Constructs a new error.
Definition: exceptions.cpp:57
const std::string & filename(void) const
Gets the name of the file that could not be found.
Definition: exceptions.cpp:123
virtual ~error(void)
Destructor for the error.
Definition: exceptions.cpp:48
error(const std::string &)
Constructs a new error with a plain-text message.
Definition: exceptions.cpp:41
virtual ~file_not_found_error(void)
Destructor for the error.
Definition: exceptions.cpp:114
std::string _filename
Name of the not-found file.
Definition: exceptions.hpp:70
virtual ~api_error(void)
Destructor for the error.
Definition: exceptions.cpp:66
A RAII model for the Lua state.
Definition: state.hpp:76
file_not_found_error(const std::string &)
Constructs a new error.
Definition: exceptions.cpp:105
std::string _api_function
Name of the Lua C API function that caused the error.
Definition: exceptions.hpp:55