4 ms·
I really don't want my software to be polite, I think that many Linux CLI tools do a good job with this: cat: /etc/whatever: No such file or directory No
by yonatan8070 3y ago
I really don't want my software to be polite, I think that many Linux CLI tools do a good job with this:
cat: /etc/whatever: No such file or directory
No nonesense, no politeness, just the pure, searchable error. I've noticed that some MS CLI tools do the exact opposite, and print out an entire paragraph to say something very simple, gpupdate comes to mind, spitting this out if the domain is unreachable:
The processing of Group Policy failed because of lack of network connectivity to a domain controller. This may be a transient condition. A success message would be generated once the machine gets connected to the domain controller and Group Policy has successfully processed. If you do not see a success Message for several hours, then contact your administrator.
A much more sensible error in my opinion would be:
Group Policy update failed: domain.tld: Destination host unreachable / Destination network unreachable / timeout / ...
Which would be both more consice and more informative about the actual issue
- kevincox 3y agoFor something as simple as cat that may work fine. But that message actually fails to say why it failed. It just gives you a fact that is presumably related to the exit code. In fact it doesn't even say it failed at all!, if your shell doesn't show the exit code you may read this as a warning or other non-critical information.. While it is hard to argue with succinctness of an error from such a simple program it may be better to say something like: Fatal error: Couldn't open /etc/whatever. No such file or directory. This says: 1. What failed. (Couldn't open /etc/whatever) 2. Why it failed. (No such file or directory) 3. How this was handled (Fatal)