classPiiException
#include <PiiException.h>
PiiException is the base class of all exceptions.
Inherited by PiiCalibrationException, PiiCameraDriverException, PiiClassificationException, PiiExecutionException, PiiInvalidArgumentException, PiiIoDriverException, PiiIOException, PiiLoadException, PiiMathException, PiiMimeException, PiiNetworkException, PiiSerializationException, PiiVideoException
Description
Usually, one does not throw an PiiException directly but creates a sub-class whose type identifies the exception more precisely.
Constructors and destructor
|
Constructs a new exception with the given message and error location. |
|
|
( )
Constructs an empty exception. |
|
|
Constructs a new exception with the given message. |
|
|
Copy another exception. |
|
|
virtual
|
( )
|
Public member functions
|
( )
Returns the error location, for example "PiiException.h:106". |
|
|
Returns prefix + location() + suffix, if location is non-empty. |
|
|
( )
Get the message stored in this exception. |
|
|
|
|
|
void
|
Set the error location. |
|
void
|
Set the message stored in this exception. |
Function details
-
Constructs a new exception with the given message and error location.
Parameters
- message
-
the error message. The message should be a user-readable explation of the error, and it is typically translatable.
- location
-
the location of the code this error occured at. The standard, official, God-given format is "%file:line", e.g. "%PiiException.h:30". The reason is that such a string works as a hyperlink to source code when debugging applications with (X)Emacs (which is the standard editor).
-
PiiException
()Constructs an empty exception.
-
PiiException
Constructs a new exception with the given message.
Parameters
- message
-
the error message. The message should be a user-readable explation of the error, and it is typically translatable.
-
PiiException
Copy another exception.
-
virtual ~PiiException
()[virtual] -
QString location
()Returns the error location, for example "PiiException.h:106".
Note that if you use the PII_THROW macro, location will not be included in release builds.
-
Returns prefix + location() + suffix, if location is non-empty.
Otherwise returns an empty string.
-
QString message
()Get the message stored in this exception.
-
PiiException & operator=
-
void setLocation
Set the error location.
-
void setMessage
Set the message stored in this exception.
Parameters
- message
-
the new exception message
Add a note
Not a single note added yet. Be the first, add yours.