Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nicovank committed Jan 26, 2024
1 parent 5ded10b commit b4a6a19
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/chatdbg/chatdbg_why.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import sys

import llm_utils
import openai
Expand All @@ -13,14 +14,11 @@ def why(self, arg):
stack_trace = ""
stack_frames = len(self.stack)
try:
import sys

exception_name = sys.exc_info()[0].__name__
exception_value = sys.exc_info()[1]
except:
print(
"The command 'why' only works when there is an uncaught exception. Try running 'python3 -m chatdbg -c continue'."
)
print("The command 'why' only works when there is an uncaught exception.")
print(" Try running 'python3 -m chatdbg -c continue'.")
return
for frame_lineno in self.stack:
import inspect
Expand Down

0 comments on commit b4a6a19

Please sign in to comment.