QCborParserError 結構

QCborParserError 用於 QCborValue 以報告剖析錯誤。 更多...

頭: #include <QCborParserError>
qmake: QT += core
Since: Qt 5.12

This struct was introduced in Qt 5.12.

注意: 在此結構中的所有函數均 可重入 .

公共函數

QString errorString () const

公共變量

QCborError error
qint64 offset

詳細描述

This class is used by QCborValue::fromCbor (const QByteArray &ba, QCborParserError *error) to report a parser error and the byte offset where the error was detected.

另請參閱 QCborValue and QCborError .

成員函數文檔編製

QString QCborParserError:: errorString () const

Returns a string representation of the error code. This string is not translated.

另請參閱 QCborError::toString () 和 QCborValue::fromCbor ().

成員變量文檔編製

QCborError QCborParserError:: error

This field contains the error code that indicates what decoding problem was found.

另請參閱 QCborValue::fromCbor ().

qint64 QCborParserError:: offset

This field contains the offset from the beginning of the data where the error was detected. The offset should point to the beginning of the item that contained the error, even if the error itself was elsewhere (for example, for UTF-8 decoding issues).

另請參閱 QCborValue::fromCbor ().