Error::GetSeverity()
Returns severity of the most severe error.
Virtual? |
No |
|
Class |
||
Arguments |
None |
|
Returns |
|
the severity of the most severe error |
Notes
The severity can take the following values:
Severity | Meaning |
---|---|
|
no error |
|
information, not necessarily an error |
|
a minor error occurred |
|
the command was used incorrectly |
|
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 );