Error Code Objects

MPI functions return integer error codes. You can get a descriptive string and an “error class” from an error code. An error class is just another error code, generic enough to cover a lot of more specific error codes. An error class should always have an error string attached to it. So if you want to report an error to the user, and all you have is an error code with no error string, you can get the error class and use that string instead.

The program can define its own error codes, and attach error strings and error classes.

Communicators, Wins (shared memory objects), and Files can all have error handling functions attached to them. Datatypes do not have error handlers.