Re: Checked vs Runtime exceptions

2003-06-25 Thread Rodney Waldhoff
On Wed, 25 Jun 2003, David Graham wrote: > Logging was merely an example (probably a poor one). Agreed. Logging was one of my examples, and it's a bad one for the sake of this discussion. In practice no logging API I'm aware throws Runtime or checked Exceptions, but silently fail as far as the

Re: Checked vs Runtime exceptions

2003-06-25 Thread Juozas Baliuka
> > In many cases that a database operation fails the next layer just cares > that it gets notified of the failure and logs it (you could also have > subclasses of MyException that indicate more specific failure types). > MyException is allowing other layers to be independent of the persistence >

Re: Checked vs Runtime exceptions

2003-06-25 Thread David Graham
vid Graham" <[EMAIL PROTECTED]> > To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]> > Sent: Wednesday, June 25, 2003 4:58 PM > Subject: Re: Checked vs Runtime exceptions > > > > --- Ryan Hoegg <[EMAIL PROTECTED]> wrote: > > > This

Re: Checked vs Runtime exceptions

2003-06-25 Thread Juozas Baliuka
uot;David Graham" <[EMAIL PROTECTED]> To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]> Sent: Wednesday, June 25, 2003 4:58 PM Subject: Re: Checked vs Runtime exceptions > --- Ryan Hoegg <[EMAIL PROTECTED]> wrote: > > This may be the "correct solu

Re: Checked vs Runtime exceptions

2003-06-25 Thread David Graham
--- Ryan Hoegg <[EMAIL PROTECTED]> wrote: > This may be the "correct solution" in some of your eyes, but it is far > too much overhead for most programmers who want to use logging. If my > database server is down or the logging directory can not be found when I > > want to log something, my app

Re: Checked vs Runtime exceptions

2003-06-25 Thread Ryan Hoegg
This may be the "correct solution" in some of your eyes, but it is far too much overhead for most programmers who want to use logging. If my database server is down or the logging directory can not be found when I want to log something, my application code is not the right place to handle that

Re: Checked vs Runtime exceptions

2003-06-25 Thread Juozas Baliuka
ot;David Graham" <[EMAIL PROTECTED]> To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]> Sent: Wednesday, June 25, 2003 1:16 AM Subject: RE: Checked vs Runtime exceptions > You missed the correct solution in your logging > example. Obviously, variou

Re: Checked vs Runtime exceptions

2003-06-25 Thread Juozas Baliuka
Checked exeptions look very usefull for API designers and useless for API users, doe's not it ? > You missed the correct solution in your logging > example. Obviously, various implementations will > throw different sets of exceptions so the right way to > handle it is to create a checked Logg

RE: Checked vs Runtime exceptions

2003-06-24 Thread David Graham
You missed the correct solution in your logging example. Obviously, various implementations will throw different sets of exceptions so the right way to handle it is to create a checked LoggingException and throw that from the log methods. The implementations will wrap their exceptions in LoggingE

RE: Checked vs Runtime exceptions

2003-06-24 Thread Rodney Waldhoff
I'm not sure that "ownership" necessarily enters into it, but here's some concrete examples: Consider a simple logging API: interface Log { void debug(String message); void info(String message); void fatal(String message); } One implementation of that interface might write the output to st

RE: Checked vs Runtime exceptions

2003-06-24 Thread Noel J. Bergman
> > I see his proposed technique as being useful in the case where we own > > layers A and C, and need to get through layer B in the cleanest way, > > where layer B doesn't expose a proper middleware understanding of > > exception handling. I would not want to see new middleware use his > > propos

RE: Checked vs Runtime exceptions

2003-06-24 Thread David Graham
> | > |To: "Jakarta Commons Developers List" > <[EMAIL PROTECTED]>, <[EMAIL PROTECT

RE: Checked vs Runtime exceptions

2003-06-24 Thread ericpabst
| |To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> | |cc:

RE: Checked vs Runtime exceptions

2003-06-24 Thread David Graham
> I see his proposed technique as being useful in the case where we own > layers > A and C, and need to get through layer B in the cleanest way, where > layer B > doesn't expose a proper middleware understanding of exception handling. > I > would not want to see new middleware use his proposal as

RE: Checked vs Runtime exceptions

2003-06-24 Thread Noel J. Bergman
David, >> http://radio.weblogs.com/0122027/stories/2003/04/01/JavasCheckedExceptionsWe reAMistake.html >> Although I don't entirely agree with the analysis, I do agree that the >> proposed technique can be useful. Is this exception going to be added >> somewhere to Jakarta-Commons for general us

Re: Checked vs Runtime exceptions

2003-06-24 Thread David Graham
--- "Noel J. Bergman" <[EMAIL PROTECTED]> wrote: > re: > http://radio.weblogs.com/0122027/stories/2003/04/01/JavasCheckedExceptionsWe > reAMistake.html > > Although I don't entirely agree with the analysis, I do agree that the > proposed technique can be useful. Is this exception going to be adde

Checked vs Runtime exceptions

2003-06-24 Thread Noel J. Bergman
re: http://radio.weblogs.com/0122027/stories/2003/04/01/JavasCheckedExceptionsWe reAMistake.html Although I don't entirely agree with the analysis, I do agree that the proposed technique can be useful. Is this exception going to be added somewhere to Jakarta-Commons for general use? Where will i