QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
QgsError Class Reference

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< QgsErrorMessagemMessageList
 List of messages.

Detailed Description

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.

Constructor & Destructor Documentation

QgsError::QgsError ( )
inline

Definition at line 81 of file qgserror.h.

QgsError::QgsError ( const QString &  theMessage,
const QString &  theTag 
)

Constructor with single message.

Parameters
theMessageerror message
theTagshort description, e.g. GDAL, Provider, Layer

Definition at line 35 of file qgserror.cpp.

References append().

Member Function Documentation

void QgsError::append ( const QString &  theMessage,
const QString &  theTag 
)

Append new error message.

Parameters
theMessageerror message string
theTagerror label, for example GDAL, GDAL Provider, Raster layer

Definition at line 40 of file qgserror.cpp.

References mMessageList.

Referenced by QgsGmlSchema::guessSchema(), and QgsError().

void QgsError::append ( const QgsErrorMessage theMessage)

Append new error message.

Parameters
theMessageerror message

Definition at line 45 of file qgserror.cpp.

References mMessageList.

void QgsError::clear ( )
inline

Clear error messages.

Definition at line 117 of file qgserror.h.

bool QgsError::isEmpty ( ) const
inline

Test if any error is set.

Returns
true if contains error

Definition at line 103 of file qgserror.h.

QString QgsError::message ( QgsErrorMessage::Format  theFormat = QgsErrorMessage::Html) const
QString QgsError::summary ( ) const

Short error descriprion, usually the first error in chain, the real error.

Returns
error description

Definition at line 126 of file qgserror.cpp.

References mMessageList.

Referenced by QgsErrorDialog::QgsErrorDialog().

Member Data Documentation

QList<QgsErrorMessage> QgsError::mMessageList
private

List of messages.

Definition at line 121 of file qgserror.h.

Referenced by append(), message(), and summary().


The documentation for this class was generated from the following files: