Loading...
Searching...
No Matches
CriticalError Class Reference

A custom exception class that extends std::exception to handle critical errors. More...

`#include <CriticalError.hpp>`

Inheritance diagram for CriticalError:

## Public Member Functions

| CriticalError (const std::string_view &message, std::exception_ptr inner_exception=nullptr)
| Constructs a CriticalError with a specified message and an optional inner exception.
const char * | what () const noexcept override
| Returns the error message.
std::exception_ptr | getInnerException () const
| Retrieves the inner exception.

## Detailed Description

A custom exception class that extends std::exception to handle critical errors.

This class provides a way to encapsulate critical error messages and optionally store an inner exception for more detailed error information.

## Constructor & Destructor Documentation

## CriticalError()

CriticalError::CriticalError | ( | const std::string_view & | message,
|  | std::exception_ptr | inner_exception = nullptr )

inline explicit

Constructs a CriticalError with a specified message and an optional inner exception.

Parameters

  message | A string_view containing the error message.
  inner_exception | An optional std::exception_ptr to an inner exception.

## Member Function Documentation

## getInnerException()

std::exception_ptr CriticalError::getInnerException | ( |  | ) | const

inline

Retrieves the inner exception.

Returns
  A std::exception_ptr to the inner exception, or nullptr if no inner exception is set.

## what()

const char * CriticalError::what | ( |  | ) | const

inline override noexcept

Returns the error message.

Returns
  A C-style string containing the error message.

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

- opm/common/CriticalError.hpp