Timeline for Better option than "errno" for file IO error handling
Current License: CC BY-SA 3.0
14 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 27, 2014 at 2:17 | vote | accept | glampert | ||
| Jul 27, 2014 at 2:16 | comment | added | glampert | Good to know there is some movement towards a better standard in the future. I'm selecting your answer as the accepted, even though I'll remain using strerror for now. Thanks! | |
| Jul 26, 2014 at 17:24 | comment | added | rolfl | Your answer/program is a test program, but @black is pointing out that the OP's code (which is what you should be reviewing - and that is what I meant when I said why do you think this is a test program) should write to stderr. | |
| Jul 26, 2014 at 17:14 | comment | added | Solkar | Well... because it does? | |
| Jul 26, 2014 at 17:07 | comment | added | rolfl | @Solkar, why do you think this is a test program meant to test exceptions? | |
| Jul 26, 2014 at 16:39 | comment | added | edmz | Then why does std::terminate write to stderr? | |
| Jul 26, 2014 at 16:28 | comment | added | Solkar | And indeed that is regular output of this program that is meant to test exceptions. | |
| Jul 26, 2014 at 16:23 | comment | added | edmz | Indeed that is not regular output. Therefore, you should write it to a separated stream (I might redirect stdout to focus only on stderr to cleanly see whether the program succeded or not). | |
| Jul 26, 2014 at 15:51 | comment | added | Solkar | Unless it is the regular output of the program, as it is the case here. | |
| Jul 26, 2014 at 15:30 | comment | added | edmz | Errors should be written to an error stream (such as stderr) with either cerr or clog. | |
| Jul 26, 2014 at 14:40 | history | edited | Solkar | CC BY-SA 3.0 | added 1 character in body |
| Jul 26, 2014 at 10:57 | history | edited | Solkar | CC BY-SA 3.0 | added 5 characters in body |
| Jul 26, 2014 at 10:53 | review | First posts | |||
| Jul 26, 2014 at 12:31 | |||||
| Jul 26, 2014 at 10:52 | history | answered | Solkar | CC BY-SA 3.0 |