mirror of
https://github.com/narrrl/ytd-rs.git
synced 2026-11-04 08:57:01 +01:00
refactor: improve error structure and add custom executable path
This commit is contained in:
1 parent
8ef831db11
commit
1c701d1e61
2 files changed
+37
-13
No files matched your search
+5
-2
@@ -8,6 +8,9 @@ pub enum YtDlpError {
|
||||
UTF8Error(#[from] std::string::FromUtf8Error),
|
||||
#[error("failed to parse JSON: {0}")]
|
||||
JsonError(#[from] serde_json::Error),
|
||||
#[error("yt-dlp exited with error: {0}")]
|
||||
Failure(String),
|
||||
#[error("yt-dlp exited with status {code:?}: {stderr}")]
|
||||
Failure {
|
||||
code: Option<i32>,
|
||||
stderr: String,
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user