KaMPIng 0.1.1
Flexible and (near) zero-overhead C++ bindings for MPI
Loading...
Searching...
No Matches
kamping::MpiErrorException Class Reference

The exception type used when an MPI call did not return MPI_SUCCESS. More...

#include <error_handling.hpp>

Inheritance diagram for kamping::MpiErrorException:
Collaboration diagram for kamping::MpiErrorException:

Public Member Functions

 MpiErrorException (std::string message, int mpi_error_code)
 Constructs the exception.
 
char constwhat () const noexcept final
 Gets a description of this exception.
 
int mpi_error_code () const
 Gets the error code returned by the mpi call.
 
int mpi_error_class () const
 Gets the error class corresponding to the error code.
 

Detailed Description

The exception type used when an MPI call did not return MPI_SUCCESS.

When using this with THROWING_KASSERT you should call it like this: THROWING_KASSERT_SPECIFIED(err == MPI_SUCCESS, "<MPI function that failed> failed", MpiErrorException, err);

Constructor & Destructor Documentation

◆ MpiErrorException()

kamping::MpiErrorException::MpiErrorException ( std::string message,
int mpi_error_code )
inline

Constructs the exception.

Parameters
messageA custom error message.
mpi_error_codeThe error code returned by the MPI call.

Member Function Documentation

◆ mpi_error_class()

int kamping::MpiErrorException::mpi_error_class ( ) const
inline

Gets the error class corresponding to the error code.

Returns
The error class corresponding to the error code.

◆ mpi_error_code()

int kamping::MpiErrorException::mpi_error_code ( ) const
inline

Gets the error code returned by the mpi call.

Returns
The error code returned by the mpi call.

◆ what()

char const * kamping::MpiErrorException::what ( ) const
inlinefinalnoexcept

Gets a description of this exception.

Returns
A description of this exception.

The documentation for this class was generated from the following file: