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

Don't panic on new_completion_handler #14

Merged
merged 1 commit into from Dec 13, 2023

Conversation

tokuhirom
Copy link
Contributor

https://github.com/svtlabs/screencapturekit-rs/blob/main/screencapturekit-sys/src/stream.rs#L40

I got a error like this:

ERROR!
"Failed to stop a stream that is already stopped or does not exist"
thread '<unnamed>' panicked at /Users/tokuhirom/.cargo/git/checkouts/screencapturekit-rs-fba2bd357ef070a5/78cc3db/screencapturekit-sys/./src/stream.rs:40:17:
start fail
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
libc++abi: terminating due to uncaught foreign exception

there's no way to handle this error. because it's a panic!.
In my opinion, a library shouldn't use panic!.

@1313 1313 merged commit b14dcec into svtlabs:main Dec 13, 2023
1 check failed
@tokuhirom tokuhirom deleted the new_completion_handler-error-handling branch December 14, 2023 00:01
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