||Best Practices for Exception Handling|
|Subject:||Don't wrap exceptions!|
Response to: Don't wrap exceptions!
Sorry, but you're missing the point. Whether the business code knows about SQL or not is simply of no concern. Whether it is a SQLException or your "PersistenceException": the business code should not handle any exceptions it knows nothing about. And wrapping it only removed a single layer: if the business code itself is layered also do you wrap all exceptions of the lower layers???
Showing messages 1 through 2 of 2.