Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

C/C++ API Documentation | 2025.1

# Error::Dump( const char * )

Display an `Error` struct for debugging.

Virtual? | No |
Class | `Error` |
Arguments | `const char * trace` | a string to appear next to the debugging output
Returns | `void` |

## Notes

`Dump()` can be used to determine the exact nature of an `Error` that is being handled. Its primary use is in debugging, as the nature of the output is more geared towards informing the developer than helping an end user.

## Example

The following code attempts to establish a connection to a nonexistent server, and dumps the resulting error:

Copy

    ClientApi client;
    Error e;

    client.SetPort( "bogus:12345" );
    client.Init( &amp;e );

    e.Dump( "example" );

Executing the preceding code produces the following output:

Copy

    Error example 0012FF5C
       Severity 4 (error)
       Generic 38
       Count 3
          0: 1093012493 (sub 13 sys 3 gen 38 args 1 sev 4 code 3085)
          0: %host%: host unknown.
          1: 1093012492 (sub 12 sys 3 gen 38 args 1 sev 4 code 3084)
          1: TCP connect to %host% failed.
          2: 1076240385 (sub 1 sys 8 gen 38 args 0 sev 4 code 8193)
          2: Connect to server failed; check $P4PORT.
          host = bogus
          host = bogus:12345

Your search for returned results