| Fast CDR Version 2.3.5 Fast CDR

Loading...
Searching...
No Matches
Exception Class Referenceabstract
FastCDR Serializer API Reference » Exceptions

This abstract class is used to create exceptions. More...

`#include <Exception.h>`

Inheritance diagram for Exception:
[legend]

## Public Member Functions

virtual | ~Exception () noexcept
| Default destructor.
virtual void | raise () const =0
| This function throws the object as exception.
virtual const char * | what () const noexcept
| This function returns the error message.

## Protected Member Functions

| Exception (const char *const &message) noexcept
| Default constructor.
| Exception (const Exception &ex) noexcept
| Default copy constructor.
| Exception (Exception &&ex) noexcept
| Default move constructor.
Exception & | operator= (const Exception &ex) noexcept
| Assigment operation.
Exception & | operator= (Exception &&ex) noexcept
| Assigment operation.

## Detailed Description

This abstract class is used to create exceptions.

## Constructor & Destructor Documentation

## ◆ ~Exception()

virtual ~Exception | ( |  | ) |

virtual noexcept

Default destructor.

## ◆ Exception() [1/3]

Exception | ( | const char *const & | message | ) |

protected noexcept

Default constructor.

Parameters

  message | A error message. This message pointer is copied.

## ◆ Exception() [2/3]

Exception | ( | const Exception & | ex | ) |

protected noexcept

Default copy constructor.

Parameters

  ex | Exception that will be copied.

## ◆ Exception() [3/3]

Exception | ( | Exception && | ex | ) |

protected noexcept

Default move constructor.

Parameters

  ex | Exception that will be moved.

## Member Function Documentation

## ◆ operator=() [1/2]

Exception & operator= | ( | const Exception & | ex | ) |

protected noexcept

Assigment operation.

Parameters

  ex | Exception that will be copied.

## ◆ operator=() [2/2]

Exception & operator= | ( | Exception && | ex | ) |

protected noexcept

Assigment operation.

Parameters

  ex | Exception that will be moved.

## ◆ raise()

virtual void raise | ( |  | ) | const

pure virtual

This function throws the object as exception.

Implemented in BadOptionalAccessException, BadParamException, LockedExternalAccessException, and NotEnoughMemoryException.

## ◆ what()

virtual const char * what | ( |  | ) | const

virtual noexcept

This function returns the error message.

Returns
  The error message.

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

- include/fastcdr/exceptions/Exception.h