Completion of error handling
Closed this issue · 3 comments
elfring commented
munificent commented
- fseek ⇒ readFile
I wouldn't mind handling errors better here. There's still a good bit of work to do in the CLI around handling imports. The current support is pretty rudimentary. (See #4.) When that happens, this code may end up getting rewritten. But, until then, better error handling is always good.
printf ⇒ main
Eh, if Wren can't successfully print the usage info, there's probably not much it could do to recover from that error either. Do you think error handling would be useful here?
elfring commented
- I suggest to avoid ignorance of return values a bit more.
- How do you think about to indicate a file output failure by a corresponding exit status for your program?
munificent commented
How do you think about to indicate a file output failure by a corresponding exit status for your program?
Sure, that seems reasonable for code in the CLI.