Skip to content

Commit b21692d

Browse files
committed
feat(jailer): remove panic on errors
Remove explicit panic on error. Let the error be returned from the main. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
1 parent 7b898a1 commit b21692d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/jailer/src/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,7 @@ fn main_exec() -> Result<(), JailerError> {
349349
fs::create_dir_all(env.chroot_dir())
350350
.map_err(|err| JailerError::CreateDir(env.chroot_dir().to_owned(), err))?;
351351
env.run()
352-
})
353-
.unwrap_or_else(|err| panic!("Jailer error: {}", err));
352+
})?;
354353
Ok(())
355354
}
356355

0 commit comments

Comments
 (0)