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

C/C++ API Documentation | 2025.1

# Error::GetGeneric()

Returns generic error code of the most severe error.

Virtual? | No |
Class | `Error` |
Arguments | None |
Returns | `int` | the "generic" code of the most severe error

## Notes

For more sophisticated handling, use a "switch" statement based on the error number to handle different errors in different ways.

The generic error codes are not documented at this time.

## Example

The following example attempts to establish a connection to a nonexistent server, and displays the resulting generic error code.

Copy

    ClientApi client;
    Error e;

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

    if ( e.Test() ) printf( "Init() failed, error code %d.\n", e.GetGeneric() );

Executing the preceding code produces the following output:

    Init() failed, error code 38.

Your search for returned results