> ## 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::DpfError Class Reference

`#include <dpf_api_base.h>`

## Public Types

| Type | Name |
| - | - |
| enum | [ErrorNature](#a9a3fe202cc2e46746462fdb1ce44c47f) \{  [eUnknown](#a9a3fe202cc2e46746462fdb1ce44c47fa7e0ab4a9ab10ba9158d691bf6b780592) , [eOk](#a9a3fe202cc2e46746462fdb1ce44c47fafbbb18218f01ff212fea92a133b88e21) , [eComponentLoading](#a9a3fe202cc2e46746462fdb1ce44c47fa63cc3ff6720228860f33c24e18a81abf) , [eFileNotFound](#a9a3fe202cc2e46746462fdb1ce44c47fa6173cc22576234d0f2ff8e731269f12b) ,  [eRuntimeError](#a9a3fe202cc2e46746462fdb1ce44c47fa0c8ab336a55da58dd3370cd8ec248641) , [eWrongOutputType](#a9a3fe202cc2e46746462fdb1ce44c47facb3a3ddcc8669511fb2b9e3d7a399d91) , [eFailure](#a9a3fe202cc2e46746462fdb1ce44c47faf8acd9de5506b8d9fd2acd4aaa0d2341) , [eUnexpectedVoidReturn](#a9a3fe202cc2e46746462fdb1ce44c47faa585e53574d25bd2fb1c6e9399a4a194) ,  [eUnexpectedVoidEntity](#a9a3fe202cc2e46746462fdb1ce44c47fa4387e3722275260468e6129c30889868) , [eUnimplemented](#a9a3fe202cc2e46746462fdb1ce44c47fa7e1ad7229f4996867c9fb96ed8109dd5) , [eUserInterrupted](#a9a3fe202cc2e46746462fdb1ce44c47fa5226925956eb514eff286167bd6e2116) , [eLicensingFailure](#a9a3fe202cc2e46746462fdb1ce44c47fa7e497c9bbbed6bc9974b24a48c589cba) ,  [eUnimplementedAPI](#a9a3fe202cc2e46746462fdb1ce44c47fa547c1094c3159a0eb84aadd388424ca8)  } |

## Public Member Functions

| Type | Name |
| - | - |
| | [DpfError](#a6e5be6e3d3b4beb446d2182e5913e60a) ([ErrorNature](#a9a3fe202cc2e46746462fdb1ce44c47f) [nature](#afbf881f187b078bb3840dde70d263358), std::string const &[origin](#ae9ff17267fc46a5f8c9811add42317ff), std::string const &[message](#a3bc55d7c2946bf8a9bf73b025bb0cc56)) |
| virtual const char \* | [what](#ad89a0100818b4ee541fd45f4b06da3e1) () const noexcept |
| const char \* | [message](#a3bc55d7c2946bf8a9bf73b025bb0cc56) () const noexcept |
| const char \* | [origin](#ae9ff17267fc46a5f8c9811add42317ff) () const noexcept |
| [ErrorNature](#a9a3fe202cc2e46746462fdb1ce44c47f) | [nature](#afbf881f187b078bb3840dde70d263358) () const noexcept |
| bool | [isOk](#aa215db12375801e5addbe0dbf8a97533) () const noexcept |
| void | [clear](#a31f33e6efbff5157ba3927d1c85b92bb) () noexcept |

## Detailed Description

Error from DPF call.

**See also**

[DpfException](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1DpfException.md)

**Examples**

[DataApis.cpp](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/DataApis_8cpp-example.md), [Example.cpp](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/Example_8cpp-example.md), [MeshQueryTest.cpp](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/MeshQueryTest_8cpp-example.md), [ModelTest.cpp](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/ModelTest_8cpp-example.md), and [ResultTest.cpp](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/ResultTest_8cpp-example.md).

## Member Enumeration Documentation

### ErrorNature

```cpp theme={null}
enum ansys::dpf::DpfError::ErrorNature
```

Type of error

| Enumerator | |
| - | - |
| eUnknown | Unknown error. |
| eOk | No error. |
| eComponentLoading | Error loading component. |
| eFileNotFound | File not found error. |
| eRuntimeError | [Any](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1Any.md) type of runtime error. |
| eWrongOutputType | Wrong output type. |
| eFailure | Functionality cannot be completed. |
| eUnexpectedVoidReturn | Return value expected. |
| eUnexpectedVoidEntity | Return value expected. |
| eUnimplemented | Functionality not implemented. |
| eUserInterrupted | Execution interupted by user. |
| eLicensingFailure | Licensing checks failed. |
| eUnimplementedAPI | Functionality not implemented. |

## Constructor & Destructor Documentation

### DpfError()

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

Create DPF error.

**Parameters**

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

## Member Function Documentation

### clear()

```cpp theme={null}
void ansys::dpf::DpfError::clear()
```

`noexcept`

Reset to empty state.

### isOk()

```cpp theme={null}
bool ansys::dpf::DpfError::isOk() const
```

`noexcept`

**Returns**

Indication of error.

**Examples**

[ResultTest.cpp](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/ResultTest_8cpp-example.md).

### message()

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

`noexcept`

**Returns**

User supplied error message.

### nature()

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

`noexcept`

**Returns**

Type of error.

### origin()

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

`noexcept`

**Returns**

Originator of error.

### what()

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

`virtual` `noexcept`

**Returns**

Full error message.
