Into

Modules

Documentation

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 Unknown exception with the given error message.

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.

    • Unknown An unknow error.

    • InvalidDataFormat The data read from an archive is corrupted. This error happens only when the archive notices it is reading something it did not except.

    • UnregisteredClass An input archive does not find a factory for a class name read from an archive.

    • SerializerNotFound An output archive cannot find a serializer for the object to be serialized.

    • ClassVersionMismatch The class version number read from an archive is greater than the current class version number.

    • StreamError The underlying input stream cannot be accessed.

    • StreamNotOpen The underlying input stream is not open.

    • UnrecognizedArchiveFormat The magic key in the beginning of an archive does not match the key of the reading archive.

    • ArchiveVersionMismatch The input archive version is greater than the current version of the archive implementation.

Function details

  • PiiSerializationException

    ( )

    Construct a new PiiSerializationException with the given error code.

    The exception message will be automatically generated with messageForCode().

  • PiiSerializationException

    ( )

    Construct a new PiiSerializationException with the given error code.

    The exception message will be automatically generated with messageForCode(). The info parameter gives extra information such as a class name with UnregisteredClass.

  • PiiSerializationException

    ( )

    Creates a copy of other.

  • PiiSerializationException

    ( )

    Construct an Unknown exception with the given error message.

  • Code code

    ()

    Get the error code.

  • QString info

    ()

    Get additional information.

    This can be used for any purpose. Currently, SerializerNotFound and UnregisteredClass store the class name as additional information.

  • static const char * messageForCode

    ( )
    [static]

    Convert a numerical error code into human-readable text.

Notes (0)

Add a note

Not a single note added yet. Be the first, add yours.