![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtCore \inheaderfile QtCborCommon \reentrant More...
#include <qcborcommon.h>
Public Types | |
enum | Code : int { UnknownError = 1 , AdvancePastEnd = 3 , InputOutputError = 4 , GarbageAtEnd = 256 , EndOfFile , UnexpectedBreak , UnknownType , IllegalType , IllegalNumber , IllegalSimpleType , InvalidUtf8String = 516 , DataTooLarge = 1024 , NestingTooDeep , UnsupportedType , NoError = 0 } |
This enum contains the possible error condition codes. More... | |
Public Member Functions | |
operator Code () const | |
\variable QCborError::c | |
QString | toString () const |
Returns a text string that matches the error code in this QCborError object. | |
Public Attributes | |
Code | c |
\inmodule QtCore \inheaderfile QtCborCommon \reentrant
The QCborError class holds the error condition found while parsing or validating a CBOR stream.
Definition at line 62 of file qcborcommon.h.
enum QCborError::Code : int |
This enum contains the possible error condition codes.
\value NoError No error was detected. \value UnknownError An unknown error occurred and no further details are available. \value AdvancePastEnd QCborStreamReader::next() was called but there are no more elements in the current context. \value InputOutputError An I/O error with the QIODevice occurred. \value GarbageAtEnd Data was found in the input stream after the last element. \value EndOfFile The end of the input stream was unexpectedly reached while processing an element. \value UnexpectedBreak The CBOR stream contains a Break where it is not allowed (data is corrupt and the error is not recoverable). \value UnknownType The CBOR stream contains an unknown/unparsable Type (data is corrupt and the error is not recoverable). \value IllegalType The CBOR stream contains a known type in a position it is not allowed to exist (data is corrupt and the error is not recoverable). \value IllegalNumber The CBOR stream appears to be encoding a number larger than 64-bit (data is corrupt and the error is not recoverable). \value IllegalSimpleType The CBOR stream contains a Simple Type encoded incorrectly (data is corrupt and the error is not recoverable). \value InvalidUtf8String The CBOR stream contains a text string that does not decode properly as UTF-8 (data is corrupt and the error is not recoverable). \value DataTooLarge CBOR string, map or array is too big and cannot be parsed by Qt (internal limitation, but the error is not recoverable). \value NestingTooDeep Too many levels of arrays or maps encountered while processing the input (internal limitation, but the error is not recoverable). \value UnsupportedType The CBOR stream contains a known type that the implementation does not support (internal limitation, but the error is not recoverable).
Definition at line 66 of file qcborcommon.h.
|
inline |
\variable QCborError::c
Returns the error code that this QCborError object stores.
Definition at line 89 of file qcborcommon.h.
QString QCborError::toString | ( | ) | const |
Returns a text string that matches the error code in this QCborError object.
Note: the string is not translated. Applications whose interface allow users to parse CBOR streams need to provide their own, translated strings.
Definition at line 239 of file qcborcommon.cpp.
References AdvancePastEnd, DataTooLarge, EndOfFile, QString::fromLatin1(), GarbageAtEnd, IllegalNumber, IllegalSimpleType, IllegalType, InputOutputError, InvalidUtf8String, NestingTooDeep, NoError, QStringLiteral, UnexpectedBreak, UnknownError, UnknownType, and UnsupportedType.
Referenced by QCborParserError::errorString(), and QPluginParsedMetaData::parse().
Code QCborError::c |
Definition at line 88 of file qcborcommon.h.