Skip to content

Conversation

hauntsaninja
Copy link
Contributor

@hauntsaninja hauntsaninja commented Nov 18, 2024

def _getval(self, arg):
try:
return eval(arg, self.curframe.f_globals, self.curframe.f_locals)
except:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add more detailed error handling, even if it's just

expect Exception:

would be better

@gaogaotiantian
Copy link
Member

This might be the minimum amount of code to fix the issue, but I don't think this is the correct place. It's not obvious why _getval would generate an error message. We should check the args for all the commands that require an argument (see many _print_invalid_args() calls in pdb.py) and print the error if the argument is missing.

@hauntsaninja hauntsaninja deleted the 126944 branch April 6, 2025 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants