3 ms·
This module isn't actually usable, because every error produces a panic. If a function or method is fallible, it should return `(..., error)`, not panic.
by preseinger 5y ago
This module isn't actually usable, because every error produces a panic.
If a function or method is fallible, it should return `(..., error)`, not panic.
- crypt0lution 5y agoI'll fix that up when I have some time. Thanks for pointing it out. Most panics come from when something went wrong with the ffmpeg subprocess. I didn't know that there is a way for the user to handle errors coming from this subprocess.
- preseinger 5y agoEven if an error is unrecoverable by the caller, that doesn't mean it should be a `panic`. If a server is running your code in a request handler, a `panic` would normally terminate the entire process. That's never what anyone wants.