OVERFLOW not such a great idea
Posted Sep 26, 2003 16:23 UTC (Fri) by
giraffedata (subscriber, #1954)
In reply to:
OVERFLOW not such a great idea by viro
Parent article:
dev_t expands at last
If your code doesn't deal with that gracefully
This isn't about dealing with the failure gracefully. It's about the failure itself. If, when you stat a file and some return value won't fit, your program fails gracefully with the message, "I can't tell you what the file permissions are because the kernel won't tell me," that's not nearly as good as "here are the file permissions."
The point that when you're returning multiple pieces of information, it's better to return partial information than to fail the entire request, is a good one. And doing that for some fields even though you don't do it for others is better than doing it for none of them.
(
Log in to post comments)