Changeset 283

Show
Ignore:
Timestamp:
08/11/06 12:37:33 (2 years ago)
Author:
mj
Message:

Deal with exceptions in the UI

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • z3wingdbg/trunk/TODO.txt

    r281 r283  
    2828-- 
    2929 
    30 - Actions need to deal with corner cases still (error handling) 
    3130- Documentation in the contextual help system 
    3231- Add a configuration view to the wing debugger management views 
  • z3wingdbg/trunk/browser/debuggercontrol.py

    r280 r283  
    55 
    66from z3wingdbg.interfaces import IWingDebuggerVersion, IWingDebugService 
     7from z3wingdbg.interfaces import DebugServerStartError, IDEConnectionError 
    78 
    89_ = MessageFactory('z3wingdbg') 
     
    6566        if service.debugServerRunning: 
    6667            return _(u'The server is already running') 
    67         service.startDebugServer() 
     68        try: 
     69            service.startDebugServer() 
     70        except DebugServerStartError, exception: 
     71            return exception.args[0] 
    6872        return _(u'Debugger started') 
    6973     
     
    7781        if service.connectedToIDE: 
    7882            return _(u'The debugger is already connected to the IDE') 
    79         service.connectIDE() 
     83        try: 
     84            service.connectIDE() 
     85        except IDEConnectionError, exception: 
     86            return exception.args[0] 
    8087        return _(u'Connected to IDE') 
    8188