handle err and eprintfln for errs

This commit is contained in:
Simon Kellet 2026-03-09 22:58:13 +00:00
parent 33b5ee725a
commit c254d0f89a

View File

@ -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)