Skip to content

Commit 66bf1d2

Browse files
committed
utils: don't panic on decode error in simple decoder loop
Propagate the error instead of panicking.
1 parent a25cc3f commit 66bf1d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ where
424424
Err(DecodeError::CheckEvents) | Err(DecodeError::NotEnoughOutputBuffers(_)) => {
425425
check_events(decoder)?
426426
}
427-
Err(e) => panic!("{:#}", e),
427+
Err(e) => anyhow::bail!(e),
428428
}
429429
}
430430
}

0 commit comments

Comments
 (0)