This performs the 'goto error' action using the phDO_CHECK macro that checks for rc < 0 . This is the most used macro throughout Phission. It is the main method of error handling and recovery for most functions and methods. Within conforming methods and functions there is an error label that is jumped to when an error occurs. After jumping to the error label the function or method usually returns phFAIL or some other error value. Between the error label and the return statement goes any code that is necessary to clean up the state of the system within the scope of the function to the point where the error occured.
For example, if any memory was allocated and then the system tried to perform some operation that resulted in an error, the memory would still need to be freed. The error would cause a function to return a negative value that would be passed to this macro and cause the jump to the error label. Then the memory could be freed.
The error label is usually at the end of the function and there is almost always a statement preceeding/before it.
Don't use this macro or any other macro that jumps to 'error' after the 'error' label.
Definition at line 159 of file phError.h.