Documentation

This commit is contained in:
Nyall Dawson 2018-06-05 16:35:47 +10:00
parent 40a2062ec1
commit 4e38d0696e

View File

@ -195,8 +195,12 @@ def qgis_excepthook(type, value, tb):
def installErrorHook():
"""
Installs the QGIS application error/warning hook
:return:
Installs the QGIS application error/warning hook. This causes Python exceptions
to be intercepted by the QGIS application and shown in the main window message bar
and in custom dialogs.
Generally you shouldn't call this method - it's automatically called by
the QGIS app on startup, and has no use in standalone applications and scripts.
"""
sys.excepthook = qgis_excepthook
warnings.showwarning = showWarning