diff options
author | Peter A. Bigot <pabigot@users.sourceforge.net> | 2010-05-29 19:53:56 -0500 |
---|---|---|
committer | Peter A. Bigot <pabigot@users.sourceforge.net> | 2010-05-29 19:53:56 -0500 |
commit | 9745bcbd40ffebb3771de1779e5710e84dea54b4 (patch) | |
tree | 216d9ba46ac77f98623d901db643e7799b4a0b31 | |
parent | 34a09a640f2c6c8d0fdfaa9e1e8b52fe7d797b4f (diff) |
Inhibit exception if problem occurs in rejected choice
-rw-r--r-- | pyxb/binding/content.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pyxb/binding/content.py b/pyxb/binding/content.py index a041520..4915966 100644 --- a/pyxb/binding/content.py +++ b/pyxb/binding/content.py @@ -664,7 +664,11 @@ class ChoiceState (ContentState_mixin): if self.__activeChoice is None: for choice in self.__choices: #print 'CS.ACC %s candidate %s' % (self, choice) - (consume, underflow_exc) = choice.step(instance, value, element_use) + try: + (consume, underflow_exc) = choice.step(instance, value, element_use) + except Exception, e: + consume = False + underflow_exc = e #print 'CS.ACC %s: candidate %s : %s' % (self, choice, consume) if consume: self.__activeChoice = choice |