mirror of
https://github.com/narrrl/ytd-rs.git
synced 2026-11-03 16:41:27 +01:00
better error messages
This commit is contained in:
1 parent
c1ac507152
commit
12e9243211
1 file changed
+3
-3
+3
-3
@@ -76,7 +76,7 @@ impl YoutubeDL {
|
||||
if !path.exists() {
|
||||
// if not create
|
||||
if let Err(why) = create_dir_all(&path) {
|
||||
return Err(format!("Error: {:?}", why));
|
||||
return Err(format!("Error while creating directories: {:?}", why));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ impl YoutubeDL {
|
||||
match canonicalize(dl_path) {
|
||||
// return new youtube-dl job
|
||||
Ok(path) => Ok(YoutubeDL { path, link, args }),
|
||||
Err(why) => Err(format!("Error: {:?}", why)),
|
||||
Err(why) => Err(format!("Error creating YouTubeDL: {:?}", why)),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ impl YoutubeDL {
|
||||
let result = self.spawn_youtube_dl();
|
||||
|
||||
if let Err(why) = result {
|
||||
Err(format!("Error: {:?}", why))
|
||||
Err(format!("Error downloading video: {:?}", why))
|
||||
} else {
|
||||
Ok(&self.path)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user