From c254d0f89ac24b304b7f7638dad14ac1a48d25ff Mon Sep 17 00:00:00 2001 From: Simon Kellet Date: Mon, 9 Mar 2026 22:58:13 +0000 Subject: [PATCH] handle err and eprintfln for errs --- main.odin | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.odin b/main.odin index c561036..82596aa 100644 --- a/main.odin +++ b/main.odin @@ -37,7 +37,7 @@ main :: proc() { html, parse_err := parse_file_md_to_html(file, arena_alloc) if parse_err != nil { - fmt.printfln("ERROR: Could not open file %s: %s", file, os.error_string(parse_err)) + fmt.eprintfln("ERROR: Could not open file %s: %s", file, os.error_string(parse_err)) } filename := strings.split(file, directory) @@ -53,6 +53,9 @@ main :: proc() { full_filename := strings.to_string(sb) file, file_err := os.create(full_filename) + if file_err != nil { + fmt.eprintfln("ERROR: Could not open file %s: %s", file, os.error_string(file_err)) + } os.write_string(file, UTF8_PREFIX) os.write_string(file, CSS_PREFIX)