#What's the difference about these error handling methods?

5 messages · Page 1 of 1 (latest)

wary coral
#

What's the difference about these error handling methods?

primal pecan
#

The former prints and then returns the error

#

The latter just returns the error (wrapped in another error message to provide further context)

wary coral
#

Is it just personal preference on which to use or is there a standard method?

primal pecan
#

That depends a bit on more code context.