General Info

Interface: Exception
Files: lib/exception.h
Last change: 27/12/2001
Author: Luiz Henrique Shigunov
Description
Structures
Functions
  • 0x00 - SetCallBack - Set function that handles exceptions
  •  

    Description

    This page describes Exception user interface.

    Every program that wants to handle exceptions generated by its own threads must use this interface.

    Exceptions that can be handled are the ones defined on UserModManager.

    Structures

    typedef struct {
        unsigned int type;
        unsigned int address;
        unsigned int data[1];
    } Exception;
    

    Where type is the exception code, address the address in the program code where the exception occurred and data are specific data of each exception defined on UserModManager.

    0x00 - SetCallBack

    Syntax

    void SetCallBack(void *callBack);

    Description

    This function sets the callback function that handles exceptions to callBack.

    If callBack is NULL no function handles exceptions and, in this case, the thread that caused the exception is finished.

    callBack must have this syntax: void callBack(Exception *e);

    If the callBack function returns, the thread that caused the exception continues executing.

    Return value

    Nothing.