Re:The art of the error message
by adrianratnapala on Monday January 08, 2018 @02:24AM
(#16095204)
Yes. From the title, I thought the article was about how to actually address that problem.
That said, I wonder if you could invert it. When trying to make a seemingly arbitrary architectural choice, then perhps to break the tie you can ask yourself "if an error occurs, will this allow me to get the right info to the user?"
Re:The art of the error message
by vadimberman on Monday January 08, 2018 @02:55AM
(#16095300)
> When trying to make a seemingly arbitrary architectural choice, then perhps to break the tie you can ask yourself "if an error occurs, will this allow me to get the right info to the user?"
Definitely. That is something I've never heard discussed, and it really should be discussed. User experience is influenced by the inner works of the engine, too.
Re:The art of the error message
by MaxBarraclough on Monday January 08, 2018 @04:22AM
(#16095619)
A similar question arises for logging.
IMHO better error messages start with less architecture. When we try to optimize the code reuse, we obtain a split between the code that detect the error but do not have any cue about the action the user is performing and the caller that will receive a generic error message (string) with no way to do something clever without breaking abstraction.
Re:The art of the error message
by martincmartin on Monday January 08, 2018 @09:02AM
(#16096743)
The higher level can catch the error, and context, and re throw.
Better error messages start with better architecture.