    

 ## On this page

  

 

 # ansys::dpf::DpfError Class Reference

 Last update: 16.07.2025 

`#include <dpf_api_base.h>`

## <a id="pub-types" name="pub-types"></a>Public Types

enum [ErrorNature](classansys_1_1dpf_1_1DpfError.xhtml#a9a3fe202cc2e46746462fdb1ce44c47f) {   
 [eUnknown](classansys_1_1dpf_1_1DpfError.xhtml#a9a3fe202cc2e46746462fdb1ce44c47fa7e0ab4a9ab10ba9158d691bf6b780592), [eOk](classansys_1_1dpf_1_1DpfError.xhtml#a9a3fe202cc2e46746462fdb1ce44c47fafbbb18218f01ff212fea92a133b88e21), [eComponentLoading](classansys_1_1dpf_1_1DpfError.xhtml#a9a3fe202cc2e46746462fdb1ce44c47fa63cc3ff6720228860f33c24e18a81abf), [eFileNotFound](classansys_1_1dpf_1_1DpfError.xhtml#a9a3fe202cc2e46746462fdb1ce44c47fa6173cc22576234d0f2ff8e731269f12b),   
 [eRuntimeError](classansys_1_1dpf_1_1DpfError.xhtml#a9a3fe202cc2e46746462fdb1ce44c47fa0c8ab336a55da58dd3370cd8ec248641), [eWrongOutputType](classansys_1_1dpf_1_1DpfError.xhtml#a9a3fe202cc2e46746462fdb1ce44c47facb3a3ddcc8669511fb2b9e3d7a399d91), [eFailure](classansys_1_1dpf_1_1DpfError.xhtml#a9a3fe202cc2e46746462fdb1ce44c47faf8acd9de5506b8d9fd2acd4aaa0d2341), [eUnexpectedVoidReturn](classansys_1_1dpf_1_1DpfError.xhtml#a9a3fe202cc2e46746462fdb1ce44c47faa585e53574d25bd2fb1c6e9399a4a194),   
 [eUnexpectedVoidEntity](classansys_1_1dpf_1_1DpfError.xhtml#a9a3fe202cc2e46746462fdb1ce44c47fa4387e3722275260468e6129c30889868), [eUnimplemented](classansys_1_1dpf_1_1DpfError.xhtml#a9a3fe202cc2e46746462fdb1ce44c47fa7e1ad7229f4996867c9fb96ed8109dd5), [eUserInterrupted](classansys_1_1dpf_1_1DpfError.xhtml#a9a3fe202cc2e46746462fdb1ce44c47fa5226925956eb514eff286167bd6e2116), [eLicensingFailure](classansys_1_1dpf_1_1DpfError.xhtml#a9a3fe202cc2e46746462fdb1ce44c47fa7e497c9bbbed6bc9974b24a48c589cba)  
 } ## <a id="pub-methods" name="pub-methods"></a>Public Member Functions

 [DpfError](classansys_1_1dpf_1_1DpfError.xhtml#a6e5be6e3d3b4beb446d2182e5913e60a) ([ErrorNature](classansys_1_1dpf_1_1DpfError.xhtml#a9a3fe202cc2e46746462fdb1ce44c47f) [nature](classansys_1_1dpf_1_1DpfError.xhtml#afbf881f187b078bb3840dde70d263358), std::string const &amp;[origin](classansys_1_1dpf_1_1DpfError.xhtml#ae9ff17267fc46a5f8c9811add42317ff), std::string const &amp;[message](classansys_1_1dpf_1_1DpfError.xhtml#a3bc55d7c2946bf8a9bf73b025bb0cc56)) virtual const char \* [what](classansys_1_1dpf_1_1DpfError.xhtml#ad89a0100818b4ee541fd45f4b06da3e1) () const noexcept const char \* [message](classansys_1_1dpf_1_1DpfError.xhtml#a3bc55d7c2946bf8a9bf73b025bb0cc56) () const noexcept const char \* [origin](classansys_1_1dpf_1_1DpfError.xhtml#ae9ff17267fc46a5f8c9811add42317ff) () const noexcept [ErrorNature](classansys_1_1dpf_1_1DpfError.xhtml#a9a3fe202cc2e46746462fdb1ce44c47f) [nature](classansys_1_1dpf_1_1DpfError.xhtml#afbf881f187b078bb3840dde70d263358) () const noexcept bool [isOk](classansys_1_1dpf_1_1DpfError.xhtml#aa215db12375801e5addbe0dbf8a97533) () const noexcept void [clear](classansys_1_1dpf_1_1DpfError.xhtml#a31f33e6efbff5157ba3927d1c85b92bb) () noexcept <a id="details" name="details"></a>## Detailed Description

Error from DPF call.

See also[DpfException](classansys_1_1dpf_1_1DpfException.xhtml) Examples[DataApis.cpp](DataApis_8cpp-example.xhtml#_a86), [Example.cpp](Example_8cpp-example.xhtml#_a0), [MeshQueryTest.cpp](MeshQueryTest_8cpp-example.xhtml#_a2), [ModelTest.cpp](ModelTest_8cpp-example.xhtml#_a43), and [ResultTest.cpp](ResultTest_8cpp-example.xhtml#_a16).

## Member Enumeration Documentation

<a id="a9a3fe202cc2e46746462fdb1ce44c47f" name="a9a3fe202cc2e46746462fdb1ce44c47f"></a>## [◆ ](#a9a3fe202cc2e46746462fdb1ce44c47f)ErrorNature

 enum [ansys::dpf::DpfError::ErrorNature](classansys_1_1dpf_1_1DpfError.xhtml#a9a3fe202cc2e46746462fdb1ce44c47f)

Type of error

Enumerator<a id="a9a3fe202cc2e46746462fdb1ce44c47fa7e0ab4a9ab10ba9158d691bf6b780592" name="a9a3fe202cc2e46746462fdb1ce44c47fa7e0ab4a9ab10ba9158d691bf6b780592"></a>eUnknown Unknown error.

<a id="a9a3fe202cc2e46746462fdb1ce44c47fafbbb18218f01ff212fea92a133b88e21" name="a9a3fe202cc2e46746462fdb1ce44c47fafbbb18218f01ff212fea92a133b88e21"></a>eOk No error.

<a id="a9a3fe202cc2e46746462fdb1ce44c47fa63cc3ff6720228860f33c24e18a81abf" name="a9a3fe202cc2e46746462fdb1ce44c47fa63cc3ff6720228860f33c24e18a81abf"></a>eComponentLoading Error loading component.

<a id="a9a3fe202cc2e46746462fdb1ce44c47fa6173cc22576234d0f2ff8e731269f12b" name="a9a3fe202cc2e46746462fdb1ce44c47fa6173cc22576234d0f2ff8e731269f12b"></a>eFileNotFound File not found error.

<a id="a9a3fe202cc2e46746462fdb1ce44c47fa0c8ab336a55da58dd3370cd8ec248641" name="a9a3fe202cc2e46746462fdb1ce44c47fa0c8ab336a55da58dd3370cd8ec248641"></a>eRuntimeError [Any](classansys_1_1dpf_1_1Any.xhtml) type of runtime error.

<a id="a9a3fe202cc2e46746462fdb1ce44c47facb3a3ddcc8669511fb2b9e3d7a399d91" name="a9a3fe202cc2e46746462fdb1ce44c47facb3a3ddcc8669511fb2b9e3d7a399d91"></a>eWrongOutputType Wrong output type.

<a id="a9a3fe202cc2e46746462fdb1ce44c47faf8acd9de5506b8d9fd2acd4aaa0d2341" name="a9a3fe202cc2e46746462fdb1ce44c47faf8acd9de5506b8d9fd2acd4aaa0d2341"></a>eFailure Functionality cannot be completed.

<a id="a9a3fe202cc2e46746462fdb1ce44c47faa585e53574d25bd2fb1c6e9399a4a194" name="a9a3fe202cc2e46746462fdb1ce44c47faa585e53574d25bd2fb1c6e9399a4a194"></a>eUnexpectedVoidReturn Return value expected.

<a id="a9a3fe202cc2e46746462fdb1ce44c47fa4387e3722275260468e6129c30889868" name="a9a3fe202cc2e46746462fdb1ce44c47fa4387e3722275260468e6129c30889868"></a>eUnexpectedVoidEntity Return value expected.

<a id="a9a3fe202cc2e46746462fdb1ce44c47fa7e1ad7229f4996867c9fb96ed8109dd5" name="a9a3fe202cc2e46746462fdb1ce44c47fa7e1ad7229f4996867c9fb96ed8109dd5"></a>eUnimplemented Functionality not implemented.

<a id="a9a3fe202cc2e46746462fdb1ce44c47fa5226925956eb514eff286167bd6e2116" name="a9a3fe202cc2e46746462fdb1ce44c47fa5226925956eb514eff286167bd6e2116"></a>eUserInterrupted Execution interupted by user.

<a id="a9a3fe202cc2e46746462fdb1ce44c47fa7e497c9bbbed6bc9974b24a48c589cba" name="a9a3fe202cc2e46746462fdb1ce44c47fa7e497c9bbbed6bc9974b24a48c589cba"></a>eLicensingFailure Licensing checks failed.





## Constructor &amp; Destructor Documentation

<a id="a6e5be6e3d3b4beb446d2182e5913e60a" name="a6e5be6e3d3b4beb446d2182e5913e60a"></a>## [◆ ](#a6e5be6e3d3b4beb446d2182e5913e60a)DpfError()

 ansys::dpf::DpfError::DpfError  ( [ErrorNature](classansys_1_1dpf_1_1DpfError.xhtml#a9a3fe202cc2e46746462fdb1ce44c47f)  *nature*,    std::string const &amp;  *origin*,    std::string const &amp;  *message*   ) 

Create DPF error.

Parameters \[in\]natureType of error. \[in\]originOriginator of error. \[in\]messageError message. 



## Member Function Documentation

<a id="a31f33e6efbff5157ba3927d1c85b92bb" name="a31f33e6efbff5157ba3927d1c85b92bb"></a>## [◆ ](#a31f33e6efbff5157ba3927d1c85b92bb)clear()

 void ansys::dpf::DpfError::clear  ( )   noexcept 

Reset to empty state.





<a id="aa215db12375801e5addbe0dbf8a97533" name="aa215db12375801e5addbe0dbf8a97533"></a>## [◆ ](#aa215db12375801e5addbe0dbf8a97533)isOk()

 bool ansys::dpf::DpfError::isOk  ( )  const  noexcept 

ReturnsIndication of error. Examples[ResultTest.cpp](ResultTest_8cpp-example.xhtml#a18).



<a id="a3bc55d7c2946bf8a9bf73b025bb0cc56" name="a3bc55d7c2946bf8a9bf73b025bb0cc56"></a>## [◆ ](#a3bc55d7c2946bf8a9bf73b025bb0cc56)message()

 const char \* ansys::dpf::DpfError::message  ( )  const  noexcept 

ReturnsUser supplied error message. 



<a id="afbf881f187b078bb3840dde70d263358" name="afbf881f187b078bb3840dde70d263358"></a>## [◆ ](#afbf881f187b078bb3840dde70d263358)nature()

 [ErrorNature](classansys_1_1dpf_1_1DpfError.xhtml#a9a3fe202cc2e46746462fdb1ce44c47f) ansys::dpf::DpfError::nature  ( )  const  noexcept 

ReturnsType of error. 



<a id="ae9ff17267fc46a5f8c9811add42317ff" name="ae9ff17267fc46a5f8c9811add42317ff"></a>## [◆ ](#ae9ff17267fc46a5f8c9811add42317ff)origin()

 const char \* ansys::dpf::DpfError::origin  ( )  const  noexcept 

ReturnsOriginator of error. 



<a id="ad89a0100818b4ee541fd45f4b06da3e1" name="ad89a0100818b4ee541fd45f4b06da3e1"></a>## [◆ ](#ad89a0100818b4ee541fd45f4b06da3e1)what()

 virtual const char \* ansys::dpf::DpfError::what  ( )  const  virtualnoexcept 

ReturnsFull error message.