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

Prevent raw errors and use logging instead #21

Closed
orhun opened this issue Mar 9, 2021 · 1 comment
Closed

Prevent raw errors and use logging instead #21

orhun opened this issue Mar 9, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@orhun
Copy link
Owner

orhun commented Mar 9, 2021

Describe the bug
In some cases menyoki might encounter an error and terminate itself without handling the error. (#20) For that, it often uses expect and it causes to print raw Rust errors. These cases should be handled more elegantly and errors should be printed to stdout with log::error macro.

To Reproduce
Steps to reproduce the behavior:

  1. Run menyoki rec -f -c 0
  2. Press ESC
  3. See error:
thread 'main' panicked at 'No frames found to save', src/app.rs:453:28
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped)

Expected behavior

[2021-03-09T11:20:04 ERROR menyoki::app] No frames found to save.

System Information

  • OS: Arch Linux x86_64 5.11.2-arch1-1
  • Rust Version: 1.50.0-stable
  • Project Version: 1.2.1
@orhun
Copy link
Owner Author

orhun commented Jul 2, 2021

v1.4.1:

[2021-07-02T14:08:57 INFO menyoki::record] Recording 20 FPS...
^[[2021-07-02T14:08:58 WARN menyoki::record] User interrupt detected.
[2021-07-02T14:08:58 ERROR menyoki] Frame error: `No frames found to save`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant