From f4c1a6cddfa7216bb45e03549964fbaf7041fd52 Mon Sep 17 00:00:00 2001 From: Tom Close Date: Mon, 4 Dec 2017 09:20:35 +1100 Subject: [PATCH] added NineMLUsageError to list of pretty printed errors --- scripts/pype9 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/pype9 b/scripts/pype9 index 0bcb1c6a..e5e956e5 100755 --- a/scripts/pype9 +++ b/scripts/pype9 @@ -14,6 +14,8 @@ from copy import copy from argparse import ArgumentParser import pype9.cmd from pype9.utils.logging import logger +from pype9.exceptions import Pype9RuntimeError +from nineml.exceptions import NineMLUsageError parser = ArgumentParser(__doc__) parser.add_argument('cmd', choices=pype9.cmd.help.all_cmds(), @@ -26,7 +28,7 @@ argv = copy(sys.argv[2:]) del sys.argv[1:] try: getattr(pype9.cmd, args.cmd).run(argv) -except Pype9UsageError as e: +except (NineMLUsageError, Pype9RuntimeError) as e: logger.error(e) sys.exit(1) # Signal an error to the calling shell