Re: Default Error Handler

Jeff Squyres (jsquyres@lsc.nd.edu)
Tue, 22 Apr 1997 14:38:08 -0500 (EST)

On Tue, 22 Apr 1997, Tyce McLarty wrote:

> On page 272 line 18 it says:
> By default the predefined error handler for file handles is MPI_ERRORS_RETURN.
>
> Shouldn't we specifically say how errors are returned? e.g.
>
> In Fortran errors are returned in IERROR. In C errors are returned as the
> int return value. In C++ ???

Exceptions are thrown in C++. Specifically, MPI_ERRORS_EXCEPTION is the
default in C++. That is, if you call MPI::Init(), it will default to
MPI::ERRORS_EXCEPTION. I don't know if there is any text specifically
about this -- I will check into it.

> C++ is the puzzle to me. I seem to remember in the email something about
> C++ not returning errors, but always using the error handler. This sounds
> like a dead end unless users are required to supply an error handler for
> C++ or it has a different default. It sounds like an advice to users is
> needed. Have I missed something here?

Yes and no. I think there is text missing about what I mentioned above,
but it definitely makes a passing reference somewhere to how exceptions
are used. You also can check out the language bindings chapter, section
8.1.6 (page 175), which talks about the specifics of the exceptions being
thrown.

{+} Jeff Squyres
{+} squyres@cse.nd.edu
{+} Perpetual Obsessive Notre Dame Student Craving Utter Madness.
{+} "I came to ND for 4 years and ended up staying for a decade."