|
From: Rod J. <ro...@in...> - 2005-03-21 09:55:39
|
> Fine-granular exceptions are fine, of course, but I guess the main driver > should be the needs of data access client code. If client code is unable to > react specifically, it's arguably good enough to discriminate actual failure > causes through the exception message. On the other hand, there are always > special clients with special needs... I think we should capture more information. It IS possible. Exception messages are only useful for logging: they're useless to calling code. The beauty of using exception subclasses is that the client needs to worry only to whatever granularity they choose. So nothing is lost by having the finer-grained classes (assuming they do get thrown). There definitely are situations where knowing about deadlocks makes a lot of sense--for example, consider adding an aspect that logged the frequency of deadlocks and the context, to help in correcting a design flaw. And I've seen applications where people needed to find out about deadlocks, for whatever reason. R |