Error handling#

MPL performs some consistency checks when the macro MPL_DEBUG has been defined. In case of an error, an exception may be thrown with an object having one of the following types.

class error : public exception#

Base class for all MPL exception classes that will be thrown in case of run-time errors.

Subclassed by invalid_argument, invalid_count, invalid_datatype_bound, invalid_dim, invalid_layout, invalid_rank, invalid_size, invalid_tag, io_failure

Public Functions

inline explicit error(const char *const message = "unknown")#
Parameters:

message – error message that will be returned by what method

inline const char *what() const noexcept override#
Returns:

character pointer to error message

class invalid_rank : public error#

Will be thrown in case of invalid rank argument.

Public Functions

inline invalid_rank()#
inline const char *what() const noexcept override#
Returns:

character pointer to error message

class invalid_tag : public error#

Will be thrown in case of invalid tag argument.

Public Functions

inline invalid_tag()#
inline const char *what() const noexcept override#
Returns:

character pointer to error message

class invalid_size : public error#

Will be thrown in case of invalid size argument.

Public Functions

inline invalid_size()#
inline const char *what() const noexcept override#
Returns:

character pointer to error message

class invalid_count : public error#

Will be thrown in case of invalid count argument.

Public Functions

inline invalid_count()#
inline const char *what() const noexcept override#
Returns:

character pointer to error message

class invalid_layout : public error#

Will be thrown in case of invalid layout argument.

Public Functions

inline invalid_layout()#
inline const char *what() const noexcept override#
Returns:

character pointer to error message

class invalid_dim : public error#

Will be thrown in case of invalid dimension.

Public Functions

inline invalid_dim()#
inline const char *what() const noexcept override#
Returns:

character pointer to error message

class invalid_datatype_bound : public error#

Will be thrown when an error occurs while manipulating layouts.

Public Functions

inline invalid_datatype_bound()#
inline const char *what() const noexcept override#
Returns:

character pointer to error message

class invalid_argument : public error#

Will be thrown in case of invalid arguments.

Public Functions

inline invalid_argument()#
inline const char *what() const noexcept override#
Returns:

character pointer to error message