group Error System

Description

There are a number of things a lot of languages lack and that is error handling. The functions in this group allow for the raising of exceptions during runtime, and compile time.

group attributes
function ferite_raise_script_error() - Raise an exception within the ferite engine.
function ferite_verror() - Raise an error
function ferite_error() - Throw an error within the engine
function ferite_vwarning() - Display a warning message. This does not cause an exception
function ferite_warning() - Display a warning message. This does not cause an exception
function ferite_get_error_log() - Get a null terminated string containing the error and warning logs on a script
function ferite_get_error_string() - Get a null terminated string containing the error log
function ferite_get_warning_string() - Get a null terminated string containing the warning log
function ferite_reset_warnings() - Reset any warnings on the script
function ferite_reset_errors() - Reset any errors on the script
function ferite_has_compile_error() - Check to see if the script has had a compilation error
function ferite_has_warnings() - Check to see if the script has warnings
function ferite_has_runtime_error() - Check to see if the script has had a runtime error
function ferite_init_error_system() - Setup the special error handling class on a script
function ferite_set_error() - Same as ferite_error except this wont raise an exception at runtime

Functions

function ferite_raise_script_error Click to go up to the list
Raise an exception within the ferite engine.
Declaration:
    void ferite_raise_script_error( FeriteScript *script, int err, char *fmt, ... )
Description:
Use the same formating codes as printf with this function
Parameters:
    Parameter #1: FeriteScript *script - The running script
    Parameter #2: int err - The error code
    Parameter #3: char *fmt - The format of the error string

function ferite_verror Click to go up to the list
Raise an error
Declaration:
    void ferite_verror( FeriteScript *script, char *errormsg, va_list *ap )
Parameters:
    Parameter #1: FeriteScript *script - The script
    Parameter #2: int err - The error number associated with the error
    Parameter #3: char *errormsg - The error with formating codes in it
    Parameter #4: va_list *ap - The list of arguments

function ferite_error Click to go up to the list
Throw an error within the engine
Declaration:
    void ferite_error( FeriteScript *script, char *errormsg, ... )
Parameters:
    Parameter #1: FeriteScript *script - The scipt we are using
    Parameter #2: int err - The error number associated with the error
    Parameter #3: char *errormsg - The error information
    Parameter #4: . .. - The formating values

function ferite_vwarning Click to go up to the list
Display a warning message. This does not cause an exception
Declaration:
    void ferite_vwarning( FeriteScript *script, char *errormsg, ... )
Parameters:
    Parameter #1: FeriteScript *script - The current script
    Parameter #2: char *errormsg - The warning to be displayed
    Parameter #3: va_list *ap - The formatting values

function ferite_warning Click to go up to the list
Display a warning message. This does not cause an exception
Declaration:
    void ferite_warning( FeriteScript *script, char *errormsg, ... )
Parameters:
    Parameter #1: FeriteScript *script - The current script
    Parameter #2: char *errormsg - The warning to be displayed
    Parameter #3: . .. - The formatting values

function ferite_get_error_log Click to go up to the list
Get a null terminated string containing the error and warning logs on a script
Declaration:
    char *ferite_get_error_log( FeriteScript *script )
Parameters:
    Parameter #1: FeriteScript *script - The script to get the errror logs from
Returns:
    A null terminated string, you will need to ffree the string when done to prevent memory leak

function ferite_get_error_string Click to go up to the list
Get a null terminated string containing the error log
Declaration:
    char *ferite_get_error_string( FeriteScript *script )
Parameters:
    Parameter #1: FeriteScript *script - The script whose errors are required
Returns:
    A null terminated string, you will need to ffree the string when done to prevent memory leak

function ferite_get_warning_string Click to go up to the list
Get a null terminated string containing the warning log
Declaration:
    char *ferite_get_warning_string( FeriteScript *script )
Parameters:
    Parameter #1: FeriteScript *script - The script whose warnings are required
Returns:
    A null terminated string, you will need to ffree the string when done to prevent memory leak

function ferite_reset_warnings Click to go up to the list
Reset any warnings on the script
Declaration:
    void ferite_reset_warnings( FeriteScript *script )
Parameters:
    Parameter #1: FeriteScript *script - The script to check

function ferite_reset_errors Click to go up to the list
Reset any errors on the script
Declaration:
    void ferite_reset_errors( FeriteScript *script )
Parameters:
    Parameter #1: FeriteScript *script - The script to check

function ferite_has_compile_error Click to go up to the list
Check to see if the script has had a compilation error
Declaration:
    int ferite_has_compile_error( FeriteScript *script )
Parameters:
    Parameter #1: FeriteScript *script - The script to check
Returns:
    FE_TRUE if a compilation error occured, FE_FALSE otherwise

function ferite_has_warnings Click to go up to the list
Check to see if the script has warnings
Declaration:
    int ferite_has_warnings( FeriteScript *script )
Parameters:
    Parameter #1: FeriteScript *script - The script to check
Returns:
    FE_TRUE if there are warnings, FE_FALSE otherwise

function ferite_has_runtime_error Click to go up to the list
Check to see if the script has had a runtime error
Declaration:
    int ferite_has_runtime_error( FeriteScript *script )
Parameters:
    Parameter #1: FeriteScript *script - The script to check
Returns:
    FE_TRUE if a compilation error occured, FE_FALSE otherwise

function ferite_init_error_system Click to go up to the list
Setup the special error handling class on a script
Declaration:
    void ferite_init_error_system( FeriteScript *script, FeriteNamespace *ns )
Parameters:
    Parameter #1: FeriteScript *script - The current script
    Parameter #2: FeriteNamespace *ns - The namespace in which the class should be registered

function ferite_set_error Click to go up to the list
Same as ferite_error except this wont raise an exception at runtime
Declaration:
    void ferite_set_error( FeriteScript *script, int num, char *fmt, ... )

Automatically generated at 8:45pm, Wednesday 08 January 2003 by feritedoc.