PxCrypt v0.2.2
Encrypt data within an image
Loading...
Searching...
No Matches
PxCrypt::MultiDecoder::Error Class Referencefinal

The MultiDecoder::Error class is used to report errors during multi-image decoding. More...

#include <>>

Inherits Qx::AbstractError< "PxCrypt::MultiDecoder::Error", 6879 >.

Public Types

enum  Type {
  NoError ,
  MissingSources ,
  InvalidSource ,
  MissingMediums ,
  DimensionMismatch ,
  NotLargeEnough ,
  InvalidMeta ,
  PartMismatch ,
  PartsMissing ,
  ChecksumMismatch ,
  SkimFailed
}
 

Public Member Functions

 Error (Type t=NoError, qsizetype idx=-1, const QString &s={})
 
QString errorString () const
 
qsizetype imageIndex () const
 
bool isValid () const
 
QString specific () const
 
Type type () const
 

Detailed Description

Member Enumeration Documentation

◆ Type

This enum specifies the type of encoding error that occurred.

Enumerator
NoError 

No error occurred.

MissingSources 

No encoded images were provided.

InvalidSource 

The encoded image was invalid.

MissingMediums 

The encoded images require mediums to be decoded but none, or not enough were provided, or some were invalid.

DimensionMismatch 

The required medium image had different dimensions than the encoded image.

NotLargeEnough 

The provided image was not large enough to be an encoded image.

InvalidMeta 

The provided image was not encoded.

PartMismatch 

One of the parts had a different complete checksum or tag than the rest, or an unexpected part index.

PartsMissing 

The image set consists of more parts than were provided.

ChecksumMismatch 

The full payload checksum did not match that of the reassembled payload.

SkimFailed 

An unexpected error occurred while skimming data from the image.

Constructor & Destructor Documentation

◆ Error()

PxCrypt::MultiDecoder::Error::Error ( Type t = NoError,
qsizetype idx = -1,
const QString & s = {} )

Constructs an error of type t, with specific information s, related to the input image at index idx.

Note
An index of -1 is used to indicate an error that is not tied to a specific image.
See also
isValid().

Member Function Documentation

◆ errorString()

QString PxCrypt::MultiDecoder::Error::errorString ( ) const

Returns the string representation of the error.

See also
type().

◆ imageIndex()

qsizetype PxCrypt::MultiDecoder::Error::imageIndex ( ) const

Returns the index of the image that caused the error, or -1 if the error is not image specific.

◆ isValid()

bool PxCrypt::MultiDecoder::Error::isValid ( ) const

Returns true if the error's type is one other than NoError; otherwise, returns false.

See also
Type.

◆ specific()

QString PxCrypt::MultiDecoder::Error::specific ( ) const

Returns instance specific error information, if any.

See also
errorString().

◆ type()

MultiDecoder::Error::Type PxCrypt::MultiDecoder::Error::type ( ) const

Returns the type of decoding error.

See also
errorString().

The documentation for this class was generated from the following files: