3 ms·
I think this can fundamentally be summed up as: errors are "failure as data" (hence, message), and you get to write the flow (including handling and annotating
by lloeki 8y ago
I think this can fundamentally be summed up as:
errors are "failure as data" (hence, message), and you get to write the flow (including handling and annotating the call stack)
vs
exceptions are "failure as flow" (hence, stack trace), and you get to write the data (including logging)
May very well be paraphrasing a well known maxim about closures and objects as errors are a poor man's exceptions and exceptions are a poor man's errors.