MXL : Media eXchange Layer
MXL
Loading...
Searching...
No Matches
mxl::lib::fabrics::ofi::FabricException Class Reference

An internal exception type that extends. More...

#include <Exception.hpp>

Inheritance diagram for mxl::lib::fabrics::ofi::FabricException:
Collaboration diagram for mxl::lib::fabrics::ofi::FabricException:

Public Member Functions

 FabricException (std::string msg, mxlStatus status, int fiErrno)
int fiErrno () const noexcept
bool isInterrupted () const noexcept
Public Member Functions inherited from mxl::lib::fabrics::ofi::Exception
 Exception (std::string msg, mxlStatus status)
mxlStatus status () const noexcept
 Return the mxlStatus status code that describes the condition that led to the exception being thrown.
char const * what () const noexcept override
 Implements std::exception, returns a descriptive string about the error.

Static Public Member Functions

template<typename... T>
static FabricException make (int fiErrno, fmt::format_string< T... > fmt, T &&... args)
 Create a new exception object.
Static Public Member Functions inherited from mxl::lib::fabrics::ofi::Exception
template<typename... T>
static Exception exists (fmt::format_string< T... > fmt, T &&... args)
 Make an MXL_ERR_EXISTS exception.
template<typename... T>
static Exception internal (fmt::format_string< T... > fmt, T &&... args)
 Make an MXL_ERR_INTERNAL exception.
template<typename... T>
static Exception interrupted (fmt::format_string< T... > fmt, T &&... args)
 Make an MXL_ERR_INTERRUPTED exception.
template<typename... T>
static Exception invalidArgument (fmt::format_string< T... > fmt, T &&... args)
 Make an MXL_ERR_INVALID_ARG exception.
template<typename... T>
static Exception invalidState (fmt::format_string< T... > fmt, T &&... args)
 Make an MXL_ERR_INVALID_STATE exception.
template<typename... T>
static Exception make (mxlStatus status, fmt::format_string< T... > fmt, T &&... args)
 Make any type of exception.
template<typename... T>
static Exception noFabric (fmt::format_string< T... > fmt, T &&... args)
template<typename... T>
static Exception notFound (fmt::format_string< T... > fmt, T &&... args)
 Make an MXL_ERR_NOT_FOUND exception.
template<typename... T>
static Exception unsupportedOperation (fmt::format_string< T... > fmt, T &&... args)

Private Attributes

int _fiErrno

Detailed Description

An internal exception type that extends.

See also
Exception to include an error code returned from libfabric.

Definition at line 120 of file Exception.hpp.

Constructor & Destructor Documentation

◆ FabricException()

mxl::lib::fabrics::ofi::FabricException::FabricException ( std::string msg,
mxlStatus status,
int fiErrno )

Definition at line 26 of file Exception.cpp.

27 : Exception(std::move(msg), status)
29 {}
Exception(std::string msg, mxlStatus status)
Definition Exception.cpp:11
mxlStatus status() const noexcept
Return the mxlStatus status code that describes the condition that led to the exception being thrown.
Definition Exception.cpp:16

Member Function Documentation

◆ fiErrno()

int mxl::lib::fabrics::ofi::FabricException::fiErrno ( ) const
nodiscardnoexcept

Definition at line 31 of file Exception.cpp.

32 {
33 return _fiErrno;
34 }

◆ isInterrupted()

bool mxl::lib::fabrics::ofi::FabricException::isInterrupted ( ) const
nodiscardnoexcept

Definition at line 36 of file Exception.cpp.

37 {
38 return _fiErrno == -FI_EINTR;
39 }

◆ make()

template<typename... T>
FabricException mxl::lib::fabrics::ofi::FabricException::make ( int fiErrno,
fmt::format_string< T... > fmt,
T &&... args )
inlinestatic

Create a new exception object.

Parameters
fiErrnoThe error code returned by the libfabric function.
fmtFormat string
...argsFormat args

Definition at line 133 of file Exception.hpp.

134 {
135 return FabricException(fmt::format(fmt, std::forward<T>(args)...), mxlStatusFromFiErrno(fiErrno), fiErrno);
136 }
FabricException(std::string msg, mxlStatus status, int fiErrno)
Definition Exception.cpp:26
mxlStatus mxlStatusFromFiErrno(int fiErrno)
Convert an error code returned by libfabric to an appropriate mxlStatus code.
Definition Exception.cpp:41

Member Data Documentation

◆ _fiErrno

int mxl::lib::fabrics::ofi::FabricException::_fiErrno
private

Definition at line 145 of file Exception.hpp.


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