This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

question of Error_raise()

Expert 4430 points

Hi Champs,

For function macro Void Error_raise(Error_Block *eb, Error_Id id, IArg arg1, IArg arg2);  

eb — pointer to an Error_Block or NULL

If eb is NULL or Error.policy == TERMINATE, this function does not return to the caller; after calling any configured raiseHook, System_abort is called with the string "xdc.runtime.Error.raise: terminating execution\n".

Now, we do not want to abort from BIOS even get into this function with some error (in my customer's application, they set ed NULL), how to implement that?

 

Thanks,

Jing

  • Jing --

    You must provide a non-NULL eb pointer to any function that takes an error block.  If you don't, then the runtime will call System_abort() if when Error_raise() is called.


    The customer app should do something like this:

     

    Error_Block eb;

     

    Error_init(&eb);

    xyz(a,b,c, &eb);

    if (Error_check(&eb)) {

       handle the error

    }