logoalt Hacker News

naaskinglast Monday at 3:01 PM1 replyview on HN

You're leaking implementation details if you let exceptions bubble. Sometimes this is ok if all of the callers are aware of the implementation details anyway, but it can make refactoring or changing implementations more difficult otherwise.


Replies

wvenablelast Tuesday at 5:46 AM

You should leak implementation details on exceptions -- if an operation fails because of a network timeout or file access issue, that's useful information. Most exceptions cannot be meaningfully caught anyway so let me log with a good stack trace and be done with it.

show 1 reply