From a7bbf582b695bb25d1e01152a9e037ad3b34e954 Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 11 Nov 2024 01:12:29 +0800 Subject: HALF WORK: 2024.1.16 --- tools/cru-py/cru/service/__main__.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'tools/cru-py/cru/service/__main__.py') diff --git a/tools/cru-py/cru/service/__main__.py b/tools/cru-py/cru/service/__main__.py index c218bc6..1c10e82 100644 --- a/tools/cru-py/cru/service/__main__.py +++ b/tools/cru-py/cru/service/__main__.py @@ -1,4 +1,4 @@ -from cru import CruUserFriendlyException +from cru import CruException from ._app import create_app @@ -11,6 +11,10 @@ def main(): if __name__ == "__main__": try: main() - except CruUserFriendlyException as e: - print(f"Error: {e.user_message}") - exit(1) + except CruException as e: + user_message = e.get_user_message() + if user_message is not None: + print(f"Error: {user_message}") + exit(1) + else: + raise -- cgit v1.2.3