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

C/C++ API Documentation | 2025.1

# Error::Test()

Test whether an `Error` is non-empty.

Virtual? | No |
Class | `Error` |
Arguments | None |
Returns | `int` | nonzero if the error is non-empty

## Notes

`Test()` returns nonzero if `GetSeverity()` `!= E_EMPTY`.

## Example

The following code attempts to establish a connection to a server, and beeps if an error occurs:

    ClientApi client;
    Error e;

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

    if ( e.Test() ) printf( "An error has occurred.%c\n", 13 );

Your search for returned results