Russian Qt Forum

Qt => XML => Тема начата: nvek от Май 03, 2017, 05:39



Название: Ошибки выводимые errorString()
Отправлено: nvek от Май 03, 2017, 05:39
Добрый день, где можно в документации найти списки ошибок выводимых errorString()/
например, если не закрыл кавычку и так далее. Все выводимые сообщения.
QXmlStreamReader


Название: Re: Ошибки выводимые errorString()
Отправлено: ssoft от Май 03, 2017, 07:49
Может в перечислении? Правда это только категории ошибок.

Цитировать
enum QXmlStreamReader::Error

This enum specifies different error cases

QXmlStreamReader::NoError - No error has occurred.
QXmlStreamReader::CustomError - A custom error has been raised with raiseError()
QXmlStreamReader::NotWellFormedError - The parser internally raised an error due to the read XML not being well-formed.
QXmlStreamReader::PrematureEndOfDocumentError - The input stream ended before a well-formed XML document was parsed. Recovery from this error is possible if more XML arrives in the stream, either by calling addData() or by waiting for it to arrive on the device().
QXmlStreamReader::UnexpectedElementError - The parser encountered an element that was different to those it expected.

Или же в исходниках Qt

Код
C++ (Qt)
QXmlStream::tr("Extra content at end of document.");
QXmlStream::tr("Invalid entity value.");
QXmlStream::tr("Invalid XML character.");
QXmlStream::tr("Sequence ']]>' not allowed in content.");
QXmlStream::tr("Encountered incorrectly encoded content.");
QXmlStream::tr("Namespace prefix '%1' not declared");
QXmlStream::tr("Illegal namespace declaration.");
QXmlStream::tr("Attribute redefined.");
QXmlStream::tr("Unexpected character '%1' in public id literal.");
QXmlStream::tr("Invalid XML version string.");
QXmlStream::tr("Unsupported XML version.");
QXmlStream::tr("The standalone pseudo attribute must appear after the encoding.");
QXmlStream::tr("%1 is an invalid encoding name.");
QXmlStream::tr("Encoding %1 is unsupported");
QXmlStream::tr("Standalone accepts only yes or no.");
QXmlStream::tr("Invalid attribute in XML declaration.");
QXmlStream::tr("Premature end of document.");
QXmlStream::tr("Invalid document.");
QXmlStream::tr ("Expected ... "); // составное
QXmlStream::tr("Expected character data.");
 
QXmlStream::tr("Recursive entity detected.");
QXmlStream::tr("Encountered incorrectly encoded content.");
QXmlStream::tr("Start tag expected.");
QXmlStream::tr("NDATA in parameter entity declaration.");
QXmlStream::tr("XML declaration not at start of document.");
QXmlStream::tr("%1 is an invalid processing instruction name.");
QXmlStream::tr("Invalid processing instruction name.");
QXmlStream::tr("%1 is an invalid PUBLIC identifier.");
QXmlStream::tr("Illegal namespace declaration.");
QXmlStream::tr("Illegal namespace declaration.");
QXmlStream::tr("Invalid XML name.");
QXmlStream::tr("Extra content at end of document.");
QXmlStream::tr("Opening and ending tag mismatch.");
QXmlStream::tr("Entity '%1' not declared.");
QXmlStream::tr("Reference to unparsed entity '%1'.");
QXmlStream::tr("Entity '%1' not declared.");
QXmlStream::tr("Reference to external entity '%1' in attribute value.");
QXmlStream::tr("Entity '%1' not declared.");
QXmlStream::tr("Invalid character reference.");
 


Название: Re: Ошибки выводимые errorString()
Отправлено: nvek от Май 03, 2017, 09:39
то что надо, спасибо!