Hacker News new | ask | show | jobs
by preseinger 1526 days 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.

1 comments

I'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.
Even 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.