Changeset 792:b2e45d10d283


Ignore:
Timestamp:
07/24/16 08:44:06 (8 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

Added error exception simulating real life (re #303)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/pyuipc_sim.py

    r658 r792  
    621621        try:
    622622            return self._write(offset, value, type)
     623        except TypeError, e:
     624            raise e
    623625        except Exception, e:
    624626            print "failed to write offset %04x: %s" % (offset, str(e))
     
    862864            self.structDeIce = value!=0
    863865        elif offset==0x3380:       # Message
     866            if not isinstance(value, str):
     867                raise TypeError("String expected!")
    864868            self.message = value
    865869        elif offset==0x3bfc:       # ZFW
Note: See TracChangeset for help on using the changeset viewer.