4 ms·
Sometimes the correct approach is to ignore the error. If printf or equivalent in a hello world program can't print to stdout, what should it do instead of cra
by thraxil 14y ago
Sometimes the correct approach is to ignore the error.
If printf or equivalent in a hello world program can't print to stdout, what should it do instead of crashing? Send an email?
I don't think I've ever seen a hello world for a language with exceptions (checked or not) that actually handled an exception from printf either.
- 0xABADC0DA 14y agoSomething like this: # /bin/echo "Hello World" >&- /bin/echo: write error: Bad file descriptor You get this kind of thing for free with exceptions.