ErrorLog::Abort()
Abort with an error status if an error is detected.
Virtual? |
No |
|
Class |
||
Arguments |
None |
|
Returns |
|
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:
ClientApi client; Error e; client.Init( &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.