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

C/C++ API Documentation | 2025.1

# ErrorLog::Abort()

Abort with an error status if an error is detected.

Virtual? | No |
Class | `ErrorLog` |
Arguments | None |
Returns | `void` |

## Notes

If the error is empty (severity is `E_EMPTY`), `Abort()` returns. Otherwise `Abort()` causes the program to exit with a status of -1.

## Example

`Abort()` is typically called after `Init()` or `Run()` to abort the program with a non-zero status if there has been a connection problem. The code in `p4api.cc` is one example:

Copy

    ClientApi client;
    Error e;

    client.Init( &amp;e );
    ErrorLog::Abort();

If any errors are generated during `ClientApi::Init()`, the `Error` object is non-empty, and `Abort()` reports the connection error before terminating the program.

Your search for returned results