handle err and eprintfln for errs
This commit is contained in:
parent
33b5ee725a
commit
c254d0f89a
@ -37,7 +37,7 @@ main :: proc() {
|
|||||||
|
|
||||||
html, parse_err := parse_file_md_to_html(file, arena_alloc)
|
html, parse_err := parse_file_md_to_html(file, arena_alloc)
|
||||||
if parse_err != nil {
|
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)
|
filename := strings.split(file, directory)
|
||||||
@ -53,6 +53,9 @@ main :: proc() {
|
|||||||
full_filename := strings.to_string(sb)
|
full_filename := strings.to_string(sb)
|
||||||
|
|
||||||
file, file_err := os.create(full_filename)
|
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, UTF8_PREFIX)
|
||||||
os.write_string(file, CSS_PREFIX)
|
os.write_string(file, CSS_PREFIX)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user