Skip to content

Commit

Permalink
All extensions that use Info extension should catch RuntimeError
Browse files Browse the repository at this point in the history
  • Loading branch information
17451k committed Sep 19, 2018
1 parent 669b3ab commit 5c432e2
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 10 deletions.
7 changes: 5 additions & 2 deletions clade/extensions/callgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,5 +353,8 @@ def _clean_error_log(self):
def parse(args=sys.argv[1:]):
conf = parse_args(args)

c = Callgraph(conf["work_dir"], conf=conf)
c.parse(conf["cmds_file"])
try:
c = Callgraph(conf["work_dir"], conf=conf)
c.parse(conf["cmds_file"])
except RuntimeError as e:
raise SystemExit(e)
7 changes: 5 additions & 2 deletions clade/extensions/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,5 +181,8 @@ def __group_functions_by_file(self):
def parse(args=sys.argv[1:]):
conf = parse_args(args)

c = Functions(conf["work_dir"], conf=conf)
c.parse(conf["cmds_file"])
try:
c = Functions(conf["work_dir"], conf=conf)
c.parse(conf["cmds_file"])
except RuntimeError as e:
raise SystemExit(e)
7 changes: 5 additions & 2 deletions clade/extensions/macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,8 @@ def load_macros_expansions(self, files=None):
def parse(args=sys.argv[1:]):
conf = parse_args(args)

c = Macros(conf["work_dir"], conf=conf)
c.parse(conf["cmds_file"])
try:
c = Macros(conf["work_dir"], conf=conf)
c.parse(conf["cmds_file"])
except RuntimeError as e:
raise SystemExit(e)
7 changes: 5 additions & 2 deletions clade/extensions/typedefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,8 @@ def load_typedefs(self, files=None):
def parse(args=sys.argv[1:]):
conf = parse_args(args)

c = Typedefs(conf["work_dir"], conf=conf)
c.parse(conf["cmds_file"])
try:
c = Typedefs(conf["work_dir"], conf=conf)
c.parse(conf["cmds_file"])
except RuntimeError as e:
raise SystemExit(e)
7 changes: 5 additions & 2 deletions clade/extensions/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,8 @@ def load_used_in_vars(self):
def parse(args=sys.argv[1:]):
conf = parse_args(args)

c = Variables(conf["work_dir"], conf=conf)
c.parse(conf["cmds_file"])
try:
c = Variables(conf["work_dir"], conf=conf)
c.parse(conf["cmds_file"])
except RuntimeError as e:
raise SystemExit(e)

0 comments on commit 5c432e2

Please sign in to comment.