@argv_minus_one I've never had an issue with it writing in C for 25 years. Likewise Java for slightly less time.
You do something. Check for the error condition, and if you have one you can exit with an error message saying as such. Just "an error occured" is lazy programming.
@argv_minus_one "error trying to do $thing."
Still more useful than just "unknown error"
@quixoticgeek
You can reliably say what you were trying to do when the error occurred, true, but that's not the same thing as giving a good quality explanation of the error that occurred, and how can you prepare such an explanation when you catch an exception of some unknown arbitrary type?