[pywin32-checkins] pywin32/Pythonwin/pywin/debugger debugger.py, 1.19, 1.20 fail.py, 1.1, 1.2
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-10-01 14:44:59
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21342/Pythonwin/pywin/debugger Modified Files: debugger.py fail.py Log Message: Move to 'new style' exception raising. Index: debugger.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger/debugger.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** debugger.py 4 Sep 2008 23:29:16 -0000 1.19 --- debugger.py 1 Oct 2008 14:44:52 -0000 1.20 *************** *** 31,35 **** from dbgcon import * ! error = "pywin.debugger.error" def SetInteractiveContext(globs, locs): --- 31,38 ---- from dbgcon import * ! class DebuggerException(Exception): ! """A Pythonwin debugger exception""" ! ! error = DebuggerException def SetInteractiveContext(globs, locs): *************** *** 536,540 **** return self.options[option] except KeyError: ! raise error, "Option %s is not a valid option" % option def prep_run(self, cmd): --- 539,543 ---- return self.options[option] except KeyError: ! raise error("Option %s is not a valid option" % option) def prep_run(self, cmd): *************** *** 608,612 **** def run(self, cmd,globals=None, locals=None, start_stepping = 1): if type(cmd) not in [types.StringType, types.CodeType]: ! raise TypeError, "Only strings can be run" self.last_cmd_debugged = cmd if start_stepping: --- 611,615 ---- def run(self, cmd,globals=None, locals=None, start_stepping = 1): if type(cmd) not in [types.StringType, types.CodeType]: ! raise TypeError("Only strings can be run") self.last_cmd_debugged = cmd if start_stepping: *************** *** 755,759 **** title = " - break" else: ! raise error, "Invalid debugger state passed!" win32ui.GetMainFrame().SetWindowText(win32ui.LoadString(win32ui.IDR_MAINFRAME) + title) if self.debuggerState == DBGSTATE_QUITTING and state != DBGSTATE_NOT_DEBUGGING: --- 758,762 ---- title = " - break" else: ! raise error("Invalid debugger state passed!") win32ui.GetMainFrame().SetWindowText(win32ui.LoadString(win32ui.IDR_MAINFRAME) + title) if self.debuggerState == DBGSTATE_QUITTING and state != DBGSTATE_NOT_DEBUGGING: Index: fail.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger/fail.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fail.py 1 Sep 1999 23:33:41 -0000 1.1 --- fail.py 1 Oct 2008 14:44:52 -0000 1.2 *************** *** 39,43 **** d=1 e(d) ! raise ValueError, "Hi" def e(arg): --- 39,43 ---- d=1 e(d) ! raise ValueError("Hi") def e(arg): |