#include <sqratUtil.h>
Public Member Functions | |
void | Clear (HSQUIRRELVM vm) |
string | Message (HSQUIRRELVM vm) |
bool | Occurred (HSQUIRRELVM vm) |
void | Throw (HSQUIRRELVM vm, const string &err) |
Static Public Member Functions | |
static Error & | Instance () |
static string | FormatTypeError (HSQUIRRELVM vm, SQInteger idx, const string &expectedType) |
The class that must be used to deal with errors that Sqrat has
|
inline |
Clears the error associated with a given VM
vm | Target VM |
|
inlinestatic |
Returns a string that has been formatted to give a nice type error message (for usage with Class::SquirrelFunc)
vm | VM the error occurred with |
idx | Index on the stack of the argument that had a type error |
expectedType | The name of the type that the argument should have been |
|
inlinestatic |
|
inline |
Clears the error associated with a given VM and returns the associated error message
vm | Target VM |
|
inline |
Returns whether a Sqrat error has occurred with a given VM
vm | Target VM |
|
inline |
Raises an error in a given VM with a given error message
vm | Target VM |
err | A nice error message |