[Prevayler-coders] Exception handling philosophy
Brought to you by:
jsampson,
klauswuestefeld
From: Justin T. S. <ju...@kr...> - 2008-04-20 17:09:15
|
Howdy, I'm getting close to finishing the Git migration. While looking through the prevayler.org svn commits, I found more of my ideas about exception handling. Jake will be happy to hear that I had indeed eventually eliminated SkaringaException. :) As of the svn head, PrevaylerException, PrevaylerIOException, and PrevaylerError are gone, with a new PrevalenceError serving some of their purposes. And here's an interesting comment from that class: // Exception-handling notes: // // Don't expect checked and unchecked Exceptions to have different semantic // importance // // Never drop or wrap an Error // // Never throw a new checked Exception // // Throw a PrevalenceError for any abstraction-violating occurrence in // operation // // Throw a RuntimeException for any configuration problems // // Never allow the system to continue operating in an inconsistent state // // Never hang Thoughts? Cheers, Justin |