Changeset 2300

Show
Ignore:
Timestamp:
02/17/10 10:18:09 (5 months ago)
Author:
fma
Message:

Exception revisited

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/papywizard/hardware/gigaPanBotHardware.py

    r2298 r2300  
    181181                        c = self._driver.read(1)  # Get error code 
    182182                        # Do we need to read an additional '\r', here? 
    183                         raise IOError("Error in command %s (err=%s)" % (repr(cmd), repr(c))) 
     183                        raise HardwareError("Error in command %s (err=%s)" % (repr(cmd), repr(c))) 
    184184                    elif c == '\r': 
    185185                        break 
     
    187187                        answer += c 
    188188 
    189             except IOError: 
     189            except (IOError, HardwareError): 
    190190                Logger().exception("GigaPanBotHardware.__sendCmd") 
    191191                Logger().warning("GigaPanBotHardware.__sendCmd(): axis %d can't sent command %s. Retrying..." % (self._axis, repr(cmd)))