Skip to content

Commit e8b28a9

Browse files
author
梶塚太智
committed
Update main.rs
1 parent 0a77872 commit e8b28a9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,8 +536,9 @@ impl Executor {
536536
"write-file" => {
537537
let mut file =
538538
File::create(self.pop_stack().get_string()).expect("Failed to create file");
539-
file.write_all(self.pop_stack().get_string().as_bytes())
540-
.expect("Failed to write file");
539+
if let Err(e) = file.write_all(self.pop_stack().get_string().as_bytes()) {
540+
self.log_print(format!("エラー! {}\n", e))
541+
}
541542
}
542543

543544
// ファイル読み込み

0 commit comments

Comments
 (0)