You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gerhard Froehlich <g-...@gmx.de> on 2002/01/23 20:16:01 UTC

[simplestore] what Exceptions do we need?

Hi Juozas, all,
I want to add some Exceptions to the simplestore. Juozas
you proposed following two:
- ServiceNotAvailableException
for what?
- NotFoundException

maybe:
- KeyNotUniqueException
- KeyNotFoundException

is usefull too.

Your comments?

  Gerhard
 
"A man with one watch knows what time it is, 
a man with two watches is never sure... 
(Albert Einstein)"



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: [simplestore] what Exceptions do we need?

Posted by Juozas Baliuka <ba...@mwm.lt>.

At 08:05 PM 1/24/2002 +0100, you wrote:
>Hi,
>
> >From: Juozas Baliuka [mailto:baliuka@mwm.lt]
> >
> >Hi,
> >1."ServiceNotAvailableException" is useful to handle fatal erros, "Log
> >message,send SNS for admin .... "
> >
> >2."NotFoundException" <==> "KeyNotFoundException" is useful to optimize
> >"get" without   "contais" and for null result, nul is also "good" value.
>
>
>A Exception seems to be cleaner in this case. What do you think.
>
> >3."KeyNotUniqueException" <==> "DublicateKeyException" is usefull for
> >"put", because it returns "void" and  store can be used without "contais".
>
>Yep.
>
> >all of them not useful for memory stores, because they use Map for internal
> >optimizations and in case "ServiceNotAvailableException" it impossible to
> >handle, handling will fail :)
> >But for stores like "JDBCStore", "FileStore", "RemoteStore" exceptions are
> >very useful.
>
>;-) ok what's your statement. Yes or No for Exceptions?

Yes, for for Exceptions !!!.



>   Gerhard
>
>---------------------------------------------
>Very funny, Scotty. Now beam down my clothes.
>---------------------------------------------
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: [simplestore] what Exceptions do we need?

Posted by Gerhard Froehlich <g-...@gmx.de>.
Hi,

>From: Juozas Baliuka [mailto:baliuka@mwm.lt]
>
>Hi,
>1."ServiceNotAvailableException" is useful to handle fatal erros, "Log 
>message,send SNS for admin .... "
>
>2."NotFoundException" <==> "KeyNotFoundException" is useful to optimize 
>"get" without   "contais" and for null result, nul is also "good" value.


A Exception seems to be cleaner in this case. What do you think.

>3."KeyNotUniqueException" <==> "DublicateKeyException" is usefull for 
>"put", because it returns "void" and  store can be used without "contais".

Yep.

>all of them not useful for memory stores, because they use Map for internal 
>optimizations and in case "ServiceNotAvailableException" it impossible to 
>handle, handling will fail :)
>But for stores like "JDBCStore", "FileStore", "RemoteStore" exceptions are 
>very useful.

;-) ok what's your statement. Yes or No for Exceptions?

  Gerhard
 
---------------------------------------------
Very funny, Scotty. Now beam down my clothes.
---------------------------------------------


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [simplestore] what Exceptions do we need?

Posted by Juozas Baliuka <ba...@mwm.lt>.
Hi,
1."ServiceNotAvailableException" is useful to handle fatal erros, "Log 
message,send SNS for admin .... "

2."NotFoundException" <==> "KeyNotFoundException" is useful to optimize 
"get" without   "contais" and for null result, nul is also "good" value.

3."KeyNotUniqueException" <==> "DublicateKeyException" is usefull for 
"put", because it returns "void" and  store can be used without "contais".

all of them not useful for memory stores, because they use Map for internal 
optimizations and in case "ServiceNotAvailableException" it impossible to 
handle, handling will fail :)
But for stores like "JDBCStore", "FileStore", "RemoteStore" exceptions are 
very useful.


At 08:16 PM 1/23/2002 +0100, you wrote:
>Hi Juozas, all,
>I want to add some Exceptions to the simplestore. Juozas
>you proposed following two:
>- ServiceNotAvailableException
>for what?
>- NotFoundException
>
>maybe:
>- KeyNotUniqueException
>- KeyNotFoundException
>
>is usefull too.
>
>Your comments?
>
>   Gerhard
>
>"A man with one watch knows what time it is,
>a man with two watches is never sure...
>(Albert Einstein)"
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>