Skip to content

Commit

Permalink
Merge pull request #576 from cchampet/dev_samDoStopProcessWithMultipl…
Browse files Browse the repository at this point in the history
…eGraph

sam do: stop process when there are multiple graph
  • Loading branch information
cchampet authored Aug 30, 2016
2 parents a66600f + 00cade1 commit 9761bda
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions applications/sam/sam_do.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,14 @@ def run(self, parser):
self.logger.error('Tuttle graph computation has failed.')
self.logger.debug(e)
error = 1
# sam-do --continue-on-error
if not args.continueOnError:
break
# if there is a bad conversion of an exception from the tuttleHost to the pyTuttle interface
# example: a KeyboardInterrupt
# TODO: handle a custom exception thrown from the tuttleHost
if 'SWIG director method error' in str(e):
break
self.logger.info('Memory usage: ' + str(int(samUtils.memoryUsageResource())) + 'KB')

exit(error)
Expand Down

0 comments on commit 9761bda

Please sign in to comment.