Re: How to design an exception architecture in a software?
From: Michael Borgwardt (brazil_at_brazils-animeland.de)
Date: 12/30/03
- Next message: jw: "tomcat jsp log4j partially working"
- Previous message: Programmer Dude: "Re: What IS Intelligence"
- In reply to: Dave Glasser: "Re: How to design an exception architecture in a software?"
- Next in thread: Dave Glasser: "Re: How to design an exception architecture in a software?"
- Reply: Dave Glasser: "Re: How to design an exception architecture in a software?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Dec 2003 17:37:24 +0100
Dave Glasser wrote:
>>Wherever it makes sense to handle different exceptions differently within
>>the application, use different exception classes so that you can make use
>>of catch clauses at the appropriate scope.
>
>
> A counterexample would be SQLException. You might handle a duplicate
> key exception differently than you would a hosed DB connection
> exception. To know which on you were dealing with, however, you would
> have to call getErrorCode() on the SQLException.
That's not really a counterexample to what I was saying. It is simply bad
design on the part of the API designers, resulting from a combination of
necessity and laziness.
- Next message: jw: "tomcat jsp log4j partially working"
- Previous message: Programmer Dude: "Re: What IS Intelligence"
- In reply to: Dave Glasser: "Re: How to design an exception architecture in a software?"
- Next in thread: Dave Glasser: "Re: How to design an exception architecture in a software?"
- Reply: Dave Glasser: "Re: How to design an exception architecture in a software?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|