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

Proper error handling and logging. #6

Open
prixt opened this issue Feb 12, 2020 · 4 comments
Open

Proper error handling and logging. #6

prixt opened this issue Feb 12, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@prixt
Copy link
Owner

prixt commented Feb 12, 2020

Currently, almost all unwrap and other potential errors cause the application to terminate. Proper error handling will be helpful in the long run.

@prixt prixt added the enhancement New feature or request label Feb 12, 2020
@jecowa
Copy link

jecowa commented Feb 15, 2020

I got one of those unwrap errors for the first time today while I left SoundSense-RS running. The game was paused and only music was playing at the time.

Just in case it's helpful:

thread 'sound_thread' panicked at 'called Result::unwrap() on an Err value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:1188:5
note: run with RUST_BACKTRACE= environment variable to display a backtrace.

Does that mean there's a problem with the sound pack trying to play a music file that doesn't exist?

It didn't seem to have crashed, but it stopped playing music.

@prixt
Copy link
Owner Author

prixt commented Feb 18, 2020

Yeah, the UI and sound run on a different thread. When there is a crash on the UI, the whole program crashes, but when there is a crash on the sound, the UI stays.
Maybe adding an alert displaying the sound thread crash error message will help for users who won't use a version with console?

@jecowa
Copy link

jecowa commented Feb 18, 2020

Yeah, that sounds helpful. Crashes have been rare for me, though.

@prixt
Copy link
Owner Author

prixt commented Feb 18, 2020

Added some error handling in v1.4.4. I don't think it'll catch all errors though. Please report any missed errors that don't get displayed on the UI as an alert.

@prixt prixt closed this as completed Feb 18, 2020
@prixt prixt reopened this Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants