[Qgis-user] Capturing Python Error

Raúl Sangonzalo raulsangonzalo at gmail.com
Wed May 29 03:42:59 PDT 2019


Hi, is it possible to capture Python Errors? I mean, I have been able to
log most of them, but I want to capture the error in red within the Python
error Dialog.

[image: image.png]

This is what I have used so far:

def errorCatcher(msg, tag, level):
    QMessageBox.information(iface.mainWindow(), "Error", msg)
QgsApplication.messageLog().messageReceived.connect(errorCatcher)

Many thanks,
Raúl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190529/505ef74c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 8489 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190529/505ef74c/attachment.png>


More information about the Qgis-user mailing list