4 ms·
just require the programmer to check errno after every function call? /s
by amenghra 4y ago
just require the programmer to check errno after every function call? /s
- convolvatron 4y agoomg. I forgot about that. the one thing even worse than overloading the return domain.
- kilgnad 4y agoBit my company in the ass recently we uncovered a bug that was causing us to lose 20% of our data for a year. sqlite C libraries apparently still do this. The person who wrote the code was both not very good and had no idea that an error was even occuring.
- Gibbon1 4y agoStrange but true you can create functions where you pass a pointer to an error variable. error_t oops; int x = foo(10, &oops); if(oops) goto whoops; int x = foo(10, 0); // yolo!