This function inspects the specified error code and takes appropriate action, depending on the severity of the error. The last digit of the error code indicates whether the error is classified as SOM_Fatal (9), SOM_Warn (2), or SOM_Ignore (1). The default implementation of this function prints a message that includes the specified error code, filename, and line number, and terminates the current process if the error is classified as SOM_Fatal. The fileName and lineNum arguments specify where the error occurred. This routine can be replaced by changing the value of the global variable SOMError.
For C and C++ programmers, SOM defines a convenience macro, SOM_Error, which invokes this function and supplies the last two arguments.