QScxmlError Class

The QScxmlError class describes the errors returned by the Qt SCXML state machine when parsing an SCXML file. 更多...

頭: #include <QScxmlError>
qmake: QT += scxml
Since: Qt 5.7

該類在 Qt 5.7 引入。

特性

公共函數

QScxmlError (const QScxmlError & other )
QScxmlError (const QString & fileName , int line , int column , const QString & 描述 )
QScxmlError ()
QScxmlError & operator= (const QScxmlError & other )
~QScxmlError ()
int column () const
QString description () const
QString fileName () const
bool isValid () const
int line () const
QString toString () const

詳細描述

另請參閱 QScxmlStateMachine and QScxmlCompiler .

特性文檔編製

column : const int

This property holds the column number in which the SCXML error occurred.

訪問函數:

int column () const

描述 : const QString

This property holds a description of the SCXML error.

訪問函數:

QString description () const

fileName : const QString

This property holds the name of the file in which the SCXML error occurred.

訪問函數:

QString fileName () const

line : const int

This property holds the line number on which the SCXML error occurred.

訪問函數:

int line () const

valid : const bool

This property holds whether the SCXML error is valid.

訪問函數:

bool isValid () const

成員函數文檔編製

QScxmlError:: QScxmlError (const QScxmlError & other )

構造副本為 other .

QScxmlError:: QScxmlError (const QString & fileName , int line , int column , const QString & 描述 )

Creates a new valid SCXML error that contains the error message, 描述 , as well as the fileName , line ,和 column where the error occurred.

QScxmlError:: QScxmlError ()

Creates a new invalid SCXML error.

QScxmlError &QScxmlError:: operator= (const QScxmlError & other )

賦值 other to this SCXML error and returns a reference to this SCXML error.

QScxmlError:: ~QScxmlError ()

Destroys the SCXML error.

int QScxmlError:: column () const

Returns the column in which the error occurred.

注意: Getter function for property column.

QString QScxmlError:: description () const

Returns the error message.

注意: Getter function for property description.

QString QScxmlError:: fileName () const

Returns the name of the file in which the error occurred.

注意: Getter function for property fileName.

bool QScxmlError:: isValid () const

返迴 true if the error is valid, false otherwise. An invalid error can only be created by calling the default constructor or by assigning an invalid error.

注意: getter 函數對於特性 valid .

int QScxmlError:: line () const

Returns the line on which the error occurred.

注意: Getter function for property line.

QString QScxmlError:: toString () const

This convenience method converts an error to a string. Returns the error message formatted as: "filename:line:column: error: description"