Skip to content

Commit

Permalink
add final exception handling back
Browse files Browse the repository at this point in the history
  • Loading branch information
yousefissa committed Apr 4, 2023
1 parent 82da7f1 commit 570c161
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ def print_assistant_thoughts(assistant_reply):
except json.decoder.JSONDecodeError:
print_to_console("Error: Invalid JSON\n", Fore.RED, assistant_reply)

# All other errors, return "Error: + error message"
except Exception as e:
call_stack = traceback.format_exc()
print_to_console("Error: \n", Fore.RED, call_stack)


def load_variables(config_file="config.yaml"):
Expand Down

0 comments on commit 570c161

Please sign in to comment.