QGIS API Documentation
2.0.1-Dufour
|
QgsError is container for error messages (report). More...
#include <qgserror.h>
Public Member Functions | |
QgsError () | |
QgsError (const QString &theMessage, const QString &theTag) | |
Constructor with single message. | |
void | append (const QString &theMessage, const QString &theTag) |
Append new error message. | |
void | append (const QgsErrorMessage &theMessage) |
Append new error message. | |
bool | isEmpty () const |
Test if any error is set. | |
QString | message (QgsErrorMessage::Format theFormat=QgsErrorMessage::Html) const |
Full error messages description. | |
QString | summary () const |
Short error descriprion, usually the first error in chain, the real error. | |
void | clear () |
Clear error messages. |
Private Attributes | |
QList< QgsErrorMessage > | mMessageList |
List of messages. |
QgsError is container for error messages (report).
It may contain chain (sort of traceback) of error messages (e.g. GDAL - provider - layer). Higher level messages are appended at the end.
Definition at line 77 of file qgserror.h.
|
inline |
Definition at line 81 of file qgserror.h.
QgsError::QgsError | ( | const QString & | theMessage, |
const QString & | theTag | ||
) |
Constructor with single message.
theMessage | error message |
theTag | short description, e.g. GDAL, Provider, Layer |
Definition at line 35 of file qgserror.cpp.
References append().
void QgsError::append | ( | const QString & | theMessage, |
const QString & | theTag | ||
) |
Append new error message.
theMessage | error message string |
theTag | error label, for example GDAL, GDAL Provider, Raster layer |
Definition at line 40 of file qgserror.cpp.
References mMessageList.
Referenced by QgsError().
void QgsError::append | ( | const QgsErrorMessage & | theMessage | ) |
Append new error message.
theMessage | error message |
Definition at line 45 of file qgserror.cpp.
References mMessageList.
|
inline |
Clear error messages.
Definition at line 117 of file qgserror.h.
|
inline |
QString QgsError::message | ( | QgsErrorMessage::Format | theFormat = QgsErrorMessage::Html | ) | const |
Full error messages description.
theFormat | output format |
Definition at line 50 of file qgserror.cpp.
References QgsErrorMessage::file(), file, QgsErrorMessage::function(), QgsErrorMessage::line(), QgsErrorMessage::message(), mMessageList, QGis::QGIS_DEV_VERSION, QgsDebugMsg, QgsErrorMessage::tag(), and QgsErrorMessage::Text.
Referenced by QgsErrorDialog::QgsErrorDialog().
QString QgsError::summary | ( | ) | const |
Short error descriprion, usually the first error in chain, the real error.
Definition at line 107 of file qgserror.cpp.
References mMessageList.
Referenced by QgsErrorDialog::QgsErrorDialog().
|
private |
List of messages.
Definition at line 121 of file qgserror.h.