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

C/C++ API Documentation | 2025.1

# Error::GetSeverity()

Returns severity of the most severe error.

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

## Notes

The severity can take the following values:

Severity | Meaning
--- | ---
`E_EMPTY (0)` | no error
`E_INFO (1)` | information, not necessarily an error
`E_WARN (2)` | a minor error occurred
`E_FAILED (3)` | the command was used incorrectly
`E_FATAL (4)` | fatal error, the command can’t be processed

## Example

The following code attempts to establish a connection to a server, and beeps if the severity is a warning or worse:

    ClientApi client;
    Error e;

    client.SetPort( "magic:1666" );
    client.Init( &e );

    if ( e.GetSeverity() > E_INFO ) printf( "Uh-oh!%c\n", 13 );

Your search for returned results