src/eric7/DebugClients/Python/DebugClientBase.py

branch
eric7
changeset 10542
e46910b0ce73
parent 10496
f9925e08dbce
child 10551
d80184d38152
equal deleted inserted replaced
10541:b709f6cc205c 10542:e46910b0ce73
202 self.noencoding = False 202 self.noencoding = False
203 203
204 self.startOptions = None 204 self.startOptions = None
205 205
206 self.callTraceOptimization = False 206 self.callTraceOptimization = False
207
208 self.__debugeeExceptHook = None
207 209
208 def getCoding(self): 210 def getCoding(self):
209 """ 211 """
210 Public method to return the current coding. 212 Public method to return the current coding.
211 213
1237 @type Exception 1239 @type Exception
1238 @param exctb traceback for the exception 1240 @param exctb traceback for the exception
1239 @type traceback 1241 @type traceback
1240 """ 1242 """
1241 self.mainThread.user_exception((exctype, excval, exctb), True) 1243 self.mainThread.user_exception((exctype, excval, exctb), True)
1244
1245 if self.__debugeeExceptHook is not None:
1246 # call the exception hook of the program being debugged
1247 self.__debugeeExceptHook(exctype, excval, exctb)
1248
1249 def checkExceptionHook(self):
1250 """
1251 Public method to check, that 'sys.excepthook' is still our hook.
1252
1253 If the exception hook has been changed by the program being debugger, save
1254 that hook and set it to ours again. The program's hook is called in our
1255 '__unhandled_exception()' method.
1256 """
1257 if sys.excepthook != self.__unhandled_exception:
1258 self.__debugeeExceptHook = sys.excepthook
1259 sys.excepthook = self.__unhandled_exception
1242 1260
1243 def __interceptSignals(self): 1261 def __interceptSignals(self):
1244 """ 1262 """
1245 Private method to intercept common signals. 1263 Private method to intercept common signals.
1246 """ 1264 """

eric ide

mercurial