classPiiSerializationException
#include <PiiSerializationException.h>
Thrown when an error occurs in (de)serializing data.
Inherits PiiException
Description
Public types
|
enum
|
{ Unknown = 0, InvalidDataFormat, UnregisteredClass,
SerializerNotFound, ClassVersionMismatch, StreamError,
StreamNotOpen, UnrecognizedArchiveFormat, ArchiveVersionMismatch }
Error codes for serialization failures. |
Constructors and destructor
|
Construct a new PiiSerializationException with the given error code. |
|
|
Construct a new PiiSerializationException with the given error code. |
|
|
Creates a copy of other. |
|
|
Construct an |
Public member functions
|
( )
Get the error code. |
|
|
( )
Get additional information. |
Static public member functions
|
static const char *
|
Convert a numerical error code into human-readable text. |
Enumeration details
-
enum Code
Error codes for serialization failures.
-
UnknownAn unknow error. -
InvalidDataFormatThe data read from an archive is corrupted. This error happens only when the archive notices it is reading something it did not except. -
UnregisteredClassAn input archive does not find a factory for a class name read from an archive. -
SerializerNotFoundAn output archive cannot find a serializer for the object to be serialized. -
ClassVersionMismatchThe class version number read from an archive is greater than the current class version number. -
StreamErrorThe underlying input stream cannot be accessed. -
StreamNotOpenThe underlying input stream is not open. -
UnrecognizedArchiveFormatThe magic key in the beginning of an archive does not match the key of the reading archive. -
ArchiveVersionMismatchThe input archive version is greater than the current version of the archive implementation.
-
Function details
-
Construct a new PiiSerializationException with the given error code.
The exception message will be automatically generated with messageForCode().
-
Construct a new PiiSerializationException with the given error code.
The exception message will be automatically generated with messageForCode(). The
infoparameter gives extra information such as a class name withUnregisteredClass. -
PiiSerializationException
Creates a copy of other.
-
Construct an
Unknownexception with the given error message. -
Code code
()Get the error code.
-
QString info
()Get additional information.
This can be used for any purpose. Currently,
SerializerNotFoundandUnregisteredClassstore the class name as additional information. -
Convert a numerical error code into human-readable text.
Add a note
Not a single note added yet. Be the first, add yours.