Ardour  8.7-15-gadf511264b
LuaException Class Reference

#include <LuaException.h>

Inheritance diagram for LuaException:
[legend]

Public Member Functions

 LuaException (lua_State *L, int)
 
 LuaException (lua_State *L, char const *, char const *, long)
 
 ~LuaException () throw ()
 
char const * what () const throw ()
 

Static Public Member Functions

template<class Exception >
static void Throw (Exception e)
 
static void pcall (lua_State *L, int nargs=0, int nresults=0, int msgh=0)
 

Protected Member Functions

void whatFromStack ()
 

Private Attributes

lua_Statem_L
 
std::string m_what
 

Detailed Description

Definition at line 30 of file LuaException.h.

Constructor & Destructor Documentation

◆ LuaException() [1/2]

LuaException::LuaException ( lua_State L,
int   
)
inline

Construct a LuaException after a lua_pcall().

Definition at line 41 of file LuaException.h.

◆ LuaException() [2/2]

LuaException::LuaException ( lua_State L,
char const *  ,
char const *  ,
long   
)
inline

Definition at line 49 of file LuaException.h.

◆ ~LuaException()

LuaException::~LuaException ( )
throw (
)
inline

Definition at line 60 of file LuaException.h.

Member Function Documentation

◆ pcall()

static void LuaException::pcall ( lua_State L,
int  nargs = 0,
int  nresults = 0,
int  msgh = 0 
)
inlinestatic

Wrapper for lua_pcall that throws.

Definition at line 89 of file LuaException.h.

◆ Throw()

template<class Exception >
static void LuaException::Throw ( Exception  e)
inlinestatic

Throw an exception.

This centralizes all the exceptions thrown, so that we can set breakpoints before the stack is unwound, or otherwise customize the behavior.

Definition at line 80 of file LuaException.h.

◆ what()

char const* LuaException::what ( ) const
throw (
)
inline

Definition at line 66 of file LuaException.h.

◆ whatFromStack()

void LuaException::whatFromStack ( )
inlineprotected

Definition at line 100 of file LuaException.h.

Member Data Documentation

◆ m_L

lua_State* LuaException::m_L
private

Definition at line 33 of file LuaException.h.

◆ m_what

std::string LuaException::m_what
private

Definition at line 34 of file LuaException.h.


The documentation for this class was generated from the following file: