Skip to content

Commit af0c1a9

Browse files
committed
feat: added... "error handling"
1 parent 924ef87 commit af0c1a9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/encoding.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,13 @@ pub fn generate_command(state: &AV1Studio) -> Command {
3333
// Build command arguments
3434
if !state.input_file.is_empty() {
3535
cmd.arg("-i").arg(&state.input_file);
36+
} else {
37+
println!("ERROR : Input file path needs to be provided\n");
3638
}
3739
if !state.output_file.is_empty() {
3840
cmd.arg("-o").arg(&state.output_file);
41+
} else {
42+
println!("ERROR : Output file path needs to be provided\n");
3943
}
4044
if !state.scenes_file.is_empty() {
4145
cmd.arg("--scenes").arg(&state.scenes_file);

0 commit comments

Comments
 (0)