Class: QgsError

class qgis.core.QgsError

Bases: sip.wrapper

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.

QgsError() Constructor for QgsError

QgsError(message: str, tag: str) Constructor with single message.

Parameters
  • message – error message

  • tag – short description, e.g. GDAL, Provider, Layer

QgsError(QgsError)

Methods

append

Append new error message.

clear

Clear error messages

isEmpty

Test if any error is set.

message

Full error messages description

messageList

messageList return the list of current error messages

summary

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

append(self, message: str, tag: str)

Append new error message.

Parameters
  • message (str) – error message string

  • tag (str) – error label, for example GDAL, GDAL Provider, Raster layer

append(self, message: QgsErrorMessage) Append new error message.

Parameters

message – error message

clear(self)

Clear error messages

isEmpty(self)bool

Test if any error is set.

Return type

bool

Returns

True if contains error

message(self, format: QgsErrorMessage.Format = QgsErrorMessage.Html)str

Full error messages description

Parameters

format (QgsErrorMessage.Format = QgsErrorMessage.Html) – output format

Return type

str

Returns

error report

messageList(self)List[QgsErrorMessage]

messageList return the list of current error messages

Return type

List[QgsErrorMessage]

Returns

current list of error messages

summary(self)str

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

Return type

str

Returns

error description