Skip to content

Commit

Permalink
Re #4210 fix error handling of reduction interface
Browse files Browse the repository at this point in the history
  • Loading branch information
mdoucet committed Nov 28, 2011
1 parent 1664665 commit 7b5ee74
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import platform
import re
import os
import traceback

class BaseScriptElement(object):
"""
Expand Down Expand Up @@ -396,11 +397,16 @@ def apply(self):
if item.state() is not None:
item.state().update()
except:
trace = traceback.format_exc()
# Update scripter [Duplicated code because we can't use 'finally' on python 2.4]
for item in self._observers:
if item.state() is not None:
item.state().update()
raise
# Things might be broken, so update what we can
try:
item.state().update()
except:
pass
raise RuntimeError, trace
else:
raise RuntimeError, "Reduction could not be executed: Mantid could not be imported"

Expand Down

0 comments on commit 7b5ee74

Please sign in to comment.