Skip to content

Commit

Permalink
updates panic messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
birkin committed Jul 4, 2023
1 parent 7b02452 commit 95d17a2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ fn process_file( file_path: &str, file_name: &str, parent_path: &str ) {
_ => {
let err_message = "unexpected extension found".to_string();
error!( "{}", err_message );
panic!( err_message );
// panic!( err_message );
panic!( "{}", err_message );
}
};
debug!( "{}", format!("new_extension, ``{:?}``", new_extension) );
Expand All @@ -227,7 +228,8 @@ fn process_file( file_path: &str, file_name: &str, parent_path: &str ) {
let bytes_copied = fs::copy( file_path, destination_path ).unwrap_or_else( |err| {
let err_message = format!( "problem copying the file, ``{}``", err );
error!( "{}", err_message );
panic!( err_message );
// panic!( err_message );
panic!( "{}", err_message );
});
info!( "{}", format!("copied ``{:?}K``", (bytes_copied / 1024)) );

Expand All @@ -237,7 +239,8 @@ fn process_file( file_path: &str, file_name: &str, parent_path: &str ) {
let _empty_file = File::create(&path).unwrap_or_else( |err| {
let err_message = format!( "problem creating new empty file, ``{}``", err );
error!( "{}", err_message );
panic!( err_message );
// panic!( err_message );
panic!( "{}", err_message );
});
}

Expand Down

0 comments on commit 95d17a2

Please sign in to comment.