wreport::error_alloc Class Reference

Reports that memory allocation has failed. More...

`#include <error.h>`

Inheritance diagram for wreport::error_alloc:

## Public Member Functions

| error_alloc (const char *msg)
ErrorCode | code () const noexcept override
| Exception-specific error code.
const char * | what () const noexcept override
| Throw the exception, building the message printf-style.

## Data Fields

const char * | msg
| error message returned by what()

## Additional Inherited Members

Static Public Member Functions inherited from wreport::error
static const char * | strerror (ErrorCode code)
| String description for an error code.

## Detailed Description

Reports that memory allocation has failed.

## Constructor & Destructor Documentation

## error_alloc()

wreport::error_alloc::error_alloc | ( | const char * | msg | ) |

inline

Parameters

  msg | error message. It is a plain const char* in this case in order to keep things as simple as possible in case we really are very short of memory.

References msg.

## Member Function Documentation

## code()

ErrorCode wreport::error_alloc::code | ( |  | ) | const

inline override virtual noexcept

Exception-specific error code.

This is useful to map C++ exceptions to C or Fortran error codes

Implements wreport::error.

References wreport::WR_ERR_ALLOC.

## what()

const char * wreport::error_alloc::what | ( |  | ) | const

inline override virtual noexcept

Throw the exception, building the message printf-style.

Implements wreport::error.

References msg.

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

- error.h