Skip to content

Commit b9d6033

Browse files
Add Info Logging
1 parent 94290d6 commit b9d6033

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

src/utils/task.rs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,12 @@ impl Scheduler {
125125
let (task, _) = scheduler.tasks
126126
.write()
127127
.pop_min()
128-
.unwrap_or_else(|| panic!("Failed to get task"));
128+
.unwrap_or_else(
129+
|| {
130+
info!(" [ Sch ] Scheduler Panicked! Failed to Get Task");
131+
panic!();
132+
}
133+
);
129134

130135
let inner_scheduler = scheduler.clone();
131136

@@ -201,9 +206,19 @@ impl Task {
201206
)
202207
.stdout(Stdio::piped())
203208
.output()
204-
.unwrap_or_else(|_| panic!("FFMPEG Error"))
209+
.unwrap_or_else(
210+
|_| {
211+
info!(" [ Tsk ] Task Panicked! FFMPEG Error");
212+
panic!();
213+
}
214+
)
205215
.stdout
206-
).unwrap_or_else(|_| panic!("Channel Error"));
216+
).unwrap_or_else(
217+
|_| {
218+
info!(" [ Tsk ] Task Panicked! Channel Error");
219+
panic!();
220+
}
221+
);
207222
}
208223
}
209224

0 commit comments

Comments
 (0)