Hacker News new | ask | show | jobs
by bobbyi 1014 days ago
log.exception is also usually bad when you are re-raising the exception. That often results in same stacktrace logged multiple times in a row which can be confusing or at least annoyingly verbose.

But it can be helpful to log an error message (without stacktrace) to give context that is available only in this frame before letting the exception propagate to whoever ultimately handles and logs it.