Better HN
topnewbestaskshowjobs
Log inSign up

adingwall

8 karma · joined Sep 17, 2009 (17y ago) · 1 submissions

Submissions

comment 17y ago · link · parent

I often wrap checked exceptions in lower level code in higher level checked exceptions. So if I was reading a configuration file I would throw something like ConfigurationReadException and then wrap the IOException in this. Then if I switch to reading the configuration file from a database (for example), I can wrap an SQLException instead of the IOException. Encapsulation isn't broken and I still have checked exceptions.