QGIS API Documentation  2.99.0-Master (314842d)
Public Member Functions | 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 &message, const QString &tag)
 Constructor with single message. More...
 
void append (const QString &message, const QString &tag)
 Append new error message. More...
 
void append (const QgsErrorMessage &message)
 Append new error message. More...
 
void clear ()
 Clear error messages. More...
 
bool isEmpty () const
 Test if any error is set. More...
 
QString message (QgsErrorMessage::Format format=QgsErrorMessage::Html) const
 Full error messages description. More...
 
QString summary () const
 Short error description, usually the first error in chain, the real error. More...
 

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 82 of file qgserror.h.

Constructor & Destructor Documentation

◆ QgsError() [1/2]

QgsError::QgsError ( )
inline

Definition at line 86 of file qgserror.h.

◆ QgsError() [2/2]

QgsError::QgsError ( const QString &  message,
const QString &  tag 
)

Constructor with single message.

Parameters
messageerror message
tagshort description, e.g. GDAL, Provider, Layer

Definition at line 35 of file qgserror.cpp.

Member Function Documentation

◆ append() [1/2]

void QgsError::append ( const QString &  message,
const QString &  tag 
)

Append new error message.

Parameters
messageerror message string
tagerror label, for example GDAL, GDAL Provider, Raster layer

Definition at line 40 of file qgserror.cpp.

◆ append() [2/2]

void QgsError::append ( const QgsErrorMessage message)

Append new error message.

Parameters
messageerror message

Definition at line 45 of file qgserror.cpp.

◆ clear()

void QgsError::clear ( )
inline

Clear error messages.

Definition at line 122 of file qgserror.h.

◆ isEmpty()

bool QgsError::isEmpty ( ) const
inline

Test if any error is set.

Returns
true if contains error

Definition at line 108 of file qgserror.h.

◆ message()

QString QgsError::message ( QgsErrorMessage::Format  format = QgsErrorMessage::Html) const

Full error messages description.

Parameters
formatoutput format
Returns
error report

Definition at line 50 of file qgserror.cpp.

◆ summary()

QString QgsError::summary ( ) const

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

Returns
error description

Definition at line 129 of file qgserror.cpp.


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