BackgroundClient: added code to convert returned exceptions to string before sending them as json.

Thu, 06 Aug 2020 16:59:02 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 06 Aug 2020 16:59:02 +0200
changeset 7660
87291331c122
parent 7659
60ee4dc1ce06
child 7661
6bf02583bf9e

BackgroundClient: added code to convert returned exceptions to string before sending them as json.

eric6/Utilities/BackgroundClient.py file | annotate | diff | comparison | revisions
--- a/eric6/Utilities/BackgroundClient.py	Sun Aug 02 17:31:27 2020 +0200
+++ b/eric6/Utilities/BackgroundClient.py	Thu Aug 06 16:59:02 2020 +0200
@@ -181,6 +181,9 @@
                     else:
                         ret = 'Unknown service.'
                 
+                if isinstance(ret, Exception):
+                    ret = str(ret)
+                
                 self.__send(fx, fn, ret)
         except socket.error:
             pass

eric ide

mercurial