QCborError 类保持I当剖析或验证 CBOR 流时发现的错误条件。 更多...
头: | #include <QtCborCommon> |
qmake: | QT += core |
Since: | Qt 5.12 |
This struct was introduced in Qt 5.12.
注意: 在此结构中的所有函数均 可重入 .
enum | Code { NoError, UnknownError, AdvancePastEnd, InputOutputError, GarbageAtEnd, …, UnsupportedType } |
QString | toString () const |
QCborError::Code | operator QCborError::Code () const |
另请参阅 QCborStreamReader , QCborValue ,和 QCborParserError .
This enum contains the possible error condition codes.
常量 | 值 | 描述 |
---|---|---|
QCborError::NoError
|
0
|
No error was detected. |
QCborError::UnknownError
|
1
|
An unknown error occurred and no further details are available. |
QCborError::AdvancePastEnd
|
3
|
QCborStreamReader::next () was called but there are no more elements in the current context. |
QCborError::InputOutputError
|
4
|
An I/O error with the QIODevice 出现。 |
QCborError::GarbageAtEnd
|
256
|
Data was found in the input stream after the last element. |
QCborError::EndOfFile
|
257
|
The end of the input stream was unexpectedly reached while processing an element. |
QCborError::UnexpectedBreak
|
258
|
The CBOR stream contains a Break where it is not allowed (data is corrupt and the error is not recoverable). |
QCborError::UnknownType
|
259
|
The CBOR stream contains an unknown/unparsable Type (data is corrupt and the and the error is not recoverable). |
QCborError::IllegalType
|
260
|
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). |
QCborError::IllegalNumber
|
261
|
The CBOR stream appears to be encoding a number larger than 64-bit (data is corrupt and the error is not recoverable). |
QCborError::IllegalSimpleType
|
262
|
The CBOR stream contains a Simple Type encoded incorrectly (data is corrupt and the error is not recoverable). |
QCborError::InvalidUtf8String
|
516
|
The CBOR stream contains a text string that does not decode properly as UTF-8 (data is corrupt and the error is not recoverable). |
QCborError::DataTooLarge
|
1024
|
CBOR string, map or array is too big and cannot be parsed by Qt (internal limitation, but the error is not recoverable). |
QCborError::NestingTooDeep
|
1025
|
Too many levels of arrays or maps encountered while processing the input (internal limitation, but the error is not recoverable). |
QCborError::UnsupportedType
|
1026
|
The CBOR stream contains a known type that the implementation does not support (internal limitation, but the error is not recoverable). |
Returns a text string that matches the error code in this QCborError 对象。
Note: the string is not translated. Applications whose interface allow users to parse CBOR streams need to provide their own, translated strings.
另请参阅 QCborError::Code .
Returns the error code that this QCborError object stores.