> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ansys::dpf::DpfException Class Reference

`#include <dpf_api_base.h>`

Inherits std::exception.

## Public Member Functions

| Type | Name |
| - | - |
| | [DpfException](#ab417aeb3168e72745df2f8c98d912428) ([DpfError::ErrorNature](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r1/classansys_1_1dpf_1_1DpfError.md#a9a3fe202cc2e46746462fdb1ce44c47f) [nature](#ad21aba4144b3dbcb6e619931ac6ae6ed), std::string const &[origin](#a613c503433eb563fed99099941cc416d), std::string const &[message](#a69cc4e277ea17f9e7d83872db1edbf24)) |
| | [DpfException](#a692cdeed9babf4395f9ce12c64a35818) ([DpfError](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r1/classansys_1_1dpf_1_1DpfError.md) const &[error](#a07c601a38ec182b458074da6f0e52478)) |
| virtual const char \* | [what](#a0df1c0ba45617a9f207739f935d0e074) () const noexcept |
| const char \* | [message](#a69cc4e277ea17f9e7d83872db1edbf24) () const noexcept |
| const char \* | [origin](#a613c503433eb563fed99099941cc416d) () const noexcept |
| [DpfError::ErrorNature](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r1/classansys_1_1dpf_1_1DpfError.md#a9a3fe202cc2e46746462fdb1ce44c47f) | [nature](#ad21aba4144b3dbcb6e619931ac6ae6ed) () const noexcept |
| [DpfError](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r1/classansys_1_1dpf_1_1DpfError.md) | [error](#a07c601a38ec182b458074da6f0e52478) () const noexcept |

## Detailed Description

Exception thrown by DPF call.

## Constructor & Destructor Documentation

### DpfException() \[1/2]

```cpp theme={null}
ansys::dpf::DpfException::DpfException(
    DpfError::ErrorNature nature,
    std::string const & origin,
    std::string const & message
)
```

Create exception to throw.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | nature | Type of error. |
| \[in] | origin | Originator of error. |
| \[in] | message | Error message. |

### DpfException() \[2/2]

```cpp theme={null}
ansys::dpf::DpfException::DpfException(DpfError const & error)
```

Create exception to throw.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | error | Error. |

## Member Function Documentation

### error()

```cpp theme={null}
DpfError ansys::dpf::DpfException::error() const
```

`noexcept`

**Returns**

Generated [DpfError](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r1/classansys_1_1dpf_1_1DpfError.md).

### message()

```cpp theme={null}
const char * ansys::dpf::DpfException::message() const
```

`noexcept`

**Returns**

User supplied error message.

### nature()

```cpp theme={null}
DpfError::ErrorNature ansys::dpf::DpfException::nature() const
```

`noexcept`

**Returns**

Type of error.

### origin()

```cpp theme={null}
const char * ansys::dpf::DpfException::origin() const
```

`noexcept`

**Returns**

Originator of error.

### what()

```cpp theme={null}
virtual const char * ansys::dpf::DpfException::what() const
```

`virtual` `noexcept`

**Returns**

Full error message.
