[PyKDE] Error Handler
Stefan Prestele
S.Prestele at Linux-AG.com
Fri Apr 20 12:19:25 BST 2001
Hi,
the two attached patches implement the methode qt.setErrorHandler().
With setErrorHandler() you can replace the existing error handler,
who prints the error to stdout, with your own one.
For example:
...
setErrorHandler(errorHandler)
...
def errorHandler(exceptClass, exceptInstance):
"""
Rewrite standard error handler of PyQt.
"""
if isinstance(exceptInstance, CoreBizException):
exceptInstance.show()
# Do not use origional error handler.
return 0
else:
# Use original error handler.
return 1
--
Stefan Prestele Linux Information Systems AG
Praktikant Fon +49 (0)89 99 34 12-0 Stefan-George-Ring 24
S.Prestele at Linux-AG.com Fax +49 (0)89 99 34 12-99 D-81929 München
Linux is our Business. __________________________________ www.Linux-AG.com ____
Linux-Trainings bundesweit - aktuelle Termine unter www.linux-ag.com/training
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sip-Errorhandler.patch
Type: application/x-patch
Size: 1791 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20010420/28e174fd/sip-Errorhandler.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PyQt-Errorhandler.patch
Type: application/x-patch
Size: 2252 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20010420/28e174fd/PyQt-Errorhandler.bin
More information about the PyQt
mailing list