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

Functions

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_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_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_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_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_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_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_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_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_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, ... )

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_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

Automatically generated at 12:07PM, Wednesday 25 May 2005 by feritedoc.