Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unexpected argument panic in pest_debugger #740

Merged
merged 2 commits into from Nov 25, 2022

Conversation

dffdff2423
Copy link
Contributor

Fixes a panic when you provide the debugger executable with an argument it does not expect. It now exits gracefully.

before:

$ pest_debugger random args
thread 'main' panicked at 'internal error: entered unreachable code', /home/USERNAME/.cargo/registry/src/github.com-1ecc6299db9ec823/pest_debugger-2.5.0/src/main.rs:259:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

after:

$ pest_debugger random args
Error: unexpected argument `random`
Error: unexpected argument `args`

Fixes a panic when you provide the debugger executable with an argument
it does not expect. It now exits gracefully.

before:
```
$ pest_debugger random args
thread 'main' panicked at 'internal error: entered unreachable code', /home/USERNAME/.cargo/registry/src/github.com-1ecc6299db9ec823/pest_debugger-2.5.0/src/main.rs:259:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

after:
```
$ pest_debugger random args
Error: unexpected argument `random`
Error: unexpected argument `args`
```
@dffdff2423 dffdff2423 requested a review from a team as a code owner November 24, 2022 19:58
@dffdff2423 dffdff2423 requested review from tomtau and removed request for a team November 24, 2022 19:58
@tomtau tomtau enabled auto-merge (squash) November 24, 2022 23:49
Copy link
Contributor

@tomtau tomtau left a comment

Choose a reason for hiding this comment

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

Oh, this panic still slipped in. Thanks for fixing it!

debugger/src/main.rs Outdated Show resolved Hide resolved
@tomtau tomtau merged commit 0217ff2 into pest-parser:master Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants