[VFS] Softening the exceptions...

2010-10-25 Thread James Carman
What do you folks think about making the exceptions extend RuntimeException in 2.0? I really find it tedious to do try/catch everywhere I want to ask a FileObject something (like if it exists or not). - To unsubscribe, e-mail:

Re: [VFS] Softening the exceptions...

2010-10-25 Thread Steven Siebert
+1 on this issue. I use VFS on a couple projects and this is always a bit burdensome, and on several occasions have indeed caught and rethrew RuntimeExceptions. Even if we can't/shouldn't soften them, what about typing them to be more specific? Having every method throwing a FileSystemException

Re: [VFS] Softening the exceptions...

2010-10-25 Thread Ralph Goers
On Oct 25, 2010, at 8:10 AM, James Carman wrote: On Mon, Oct 25, 2010 at 11:05 AM, Gary Gregory ggreg...@seagullsoftware.com wrote: Do we want the APIs to be quieter than using java.io.File for example? Or, should exceptions be thrown from similar places? Definitely quieter than

Re: [VFS] Softening the exceptions...

2010-10-25 Thread Steven Siebert
true =) BTW, I'll be at ApacheCon, if the VFS crew would like another warm body to assist in getting the release out. Just let me know when/where to be On Mon, Oct 25, 2010 at 11:49 AM, Ralph Goers ralph.go...@dslextreme.comwrote: On Oct 25, 2010, at 8:10 AM, James Carman wrote: On Mon,

Re: [VFS] Softening the exceptions...

2010-10-25 Thread Paul Benedict
+1 for softening all exceptions. The fact is, what reasonable recourse is there to the user if a file operation fails? That's what checked exceptions were supposed to be for -- mandate handling code. It's tough to say we need to mandate handling these errors. Paul On Mon, Oct 25, 2010 at 10:49

Re: [VFS] Softening the exceptions...

2010-10-25 Thread James Carman
On Mon, Oct 25, 2010 at 11:49 AM, Ralph Goers ralph.go...@dslextreme.com wrote: I'm not in favor of changing much at this point. I'd really like to get a release done without too many more changes. There's a problem with that, Ralph. If we publish a 2.0, we can't break the API later. So,

Re: [VFS] Softening the exceptions...

2010-10-25 Thread Mark Fortner
-1 At the risk of playing Devils Advocate here, what's the downside to checked exceptions? A few extra lines of code? I can foresee a problem with unchecked exceptions though. Imagine that you're using the API to build a desktop application. You want to display a dialog box to the user

Re: [VFS] Softening the exceptions...

2010-10-25 Thread Steven Siebert
I agree with Mark's point about unfamiliar developers benefiting from checked exceptions. Unlike James, I like checked exceptions =), and I have established elegant recoveries from various resource exceptions (IO, for example) under many use cases (at least in the enterprise arena). What's

Re: [VFS] Softening the exceptions...

2010-10-25 Thread Filip Defoort
Very much -1 on unchecked exceptions. On Mon, Oct 25, 2010 at 10:33 AM, James Carman ja...@carmanconsulting.com wrote: What do people typically do with those exceptions?  Seriously, do you retry stuff on a regular basis in your catch blocks? Yes! Very much so. It's quite useful when dealing

Re: [VFS] Softening the exceptions...

2010-10-25 Thread James Carman
On Mon, Oct 25, 2010 at 1:41 PM, Filip Defoort filip...@cirquedigital.com wrote: Yes! Very much so. It's quite useful when dealing with stale nfs, locked files,... Do you implement the retry logic in every place where you need it or do you have a helper method that takes some sort of functor

Re: [VFS] Softening the exceptions...

2010-10-25 Thread James Carman
On Mon, Oct 25, 2010 at 1:17 PM, Steven Siebert smsi...@gmail.com wrote: I agree with Mark's point about unfamiliar developers benefiting from checked exceptions.  Unlike James, I like checked exceptions =), and I have established elegant recoveries from various resource exceptions (IO, for

Re: [VFS] Softening the exceptions...

2010-10-25 Thread Filip Defoort
On Mon, Oct 25, 2010 at 10:45 AM, James Carman ja...@carmanconsulting.com wrote: On Mon, Oct 25, 2010 at 1:41 PM, Filip Defoort filip...@cirquedigital.com wrote: Yes! Very much so. It's quite useful when dealing with stale nfs, locked files,... Do you implement the retry logic in every

Re: [VFS] Softening the exceptions...

2010-10-25 Thread Paul Benedict
Checked exceptions throw a burden onto the developer. He is forced to do something. Why force this burden? It assumes something SHOULD be done for these particular errors. I don't think that's realistic (they're OS errors -- not business errors), which is why checked exceptions have fallen well

Re: [VFS] Softening the exceptions...

2010-10-25 Thread James Carman
On Mon, Oct 25, 2010 at 1:48 PM, Filip Defoort filip...@cirquedigital.com wrote: Depends. I do have a bunch of wrappers for common types of retries, but often the remedy really is different depending on the operation (I'm dealing a lot with search indexes, updating them and transaction

Re: [VFS] Softening the exceptions...

2010-10-25 Thread Filip Defoort
On Mon, Oct 25, 2010 at 10:51 AM, Paul Benedict pbened...@apache.org wrote: Checked exceptions throw a burden onto the developer. He is forced to do something. Why force this burden? It assumes something SHOULD be done for these particular errors. I don't think that's realistic (they're OS

Re: [VFS] Softening the exceptions...

2010-10-25 Thread Filip Defoort
On Mon, Oct 25, 2010 at 10:52 AM, James Carman ja...@carmanconsulting.com wrote: On Mon, Oct 25, 2010 at 1:48 PM, Filip Defoort filip...@cirquedigital.com wrote: Depends. I do have a bunch of wrappers for common types of retries, but often the remedy really is different depending on the

Re: [VFS] Softening the exceptions...

2010-10-25 Thread James Carman
On Mon, Oct 25, 2010 at 1:53 PM, Filip Defoort filip...@cirquedigital.com wrote: In my view, it is the developer's job to provide an solid experience to the user. That includes properly dealing with underlying system errors in the least cryptic possible way and recovering where possible. And

Re: [VFS] Softening the exceptions...

2010-10-25 Thread Filip Defoort
On Mon, Oct 25, 2010 at 10:56 AM, James Carman ja...@carmanconsulting.com wrote: On Mon, Oct 25, 2010 at 1:53 PM, Filip Defoort filip...@cirquedigital.com wrote: In my view, it is the developer's job to provide an solid experience to the user. That includes properly dealing with underlying

Re: [VFS] Softening the exceptions...

2010-10-25 Thread James Carman
On Mon, Oct 25, 2010 at 2:00 PM, Filip Defoort filip...@cirquedigital.com wrote: Well, it's my job to write proper code. Other people can do all they want, but with just a runtime exception I wouldn't be able to do what I'd need to do. Again, I think you're misunderstanding my suggestion.

RE: [VFS] Softening the exceptions...

2010-10-25 Thread Gary Gregory
-Original Message- From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On Behalf Of James Carman Sent: Monday, October 25, 2010 08:10 To: Commons Developers List Subject: Re: [VFS] Softening the exceptions... On Mon, Oct 25, 2010 at 11:05 AM, Gary Gregory

Re: [VFS] Softening the exceptions...

2010-10-25 Thread James Carman
On Mon, Oct 25, 2010 at 3:06 PM, Gary Gregory ggreg...@seagullsoftware.com wrote: So for VFS, you would prefer that all error handling be done with unchecked exceptions? In a nutshell, yes. So, it's a pretty easy change. You'd just change the superclass of FileSystemException.

Re: [VFS] Softening the exceptions...

2010-10-25 Thread James Carman
On Mon, Oct 25, 2010 at 3:06 PM, Gary Gregory ggreg...@seagullsoftware.com wrote: So for VFS, you would prefer that all error handling be done with unchecked exceptions? This is probably a question better asked on the user list so we can get a feel for how people feel about it. I just

RE: [VFS] Softening the exceptions...

2010-10-25 Thread Gary Gregory
-Original Message- From: jcar...@carmanconsulting.com [mailto:jcar...@carmanconsulting.com] On Behalf Of James Carman Sent: Monday, October 25, 2010 10:33 To: Commons Developers List Subject: Re: [VFS] Softening the exceptions... On Mon, Oct 25, 2010 at 12:49 PM, Mark Fortner

Re: [VFS] Softening the exceptions...

2010-10-25 Thread Mario Ivankovits
Hi! Am 25.10.2010 um 21:13 schrieb James Carman ja...@carmanconsulting.com: On Mon, Oct 25, 2010 at 3:06 PM, Gary Gregory ggreg...@seagullsoftware.com wrote: So for VFS, you would prefer that all error handling be done with unchecked In a nutshell, yes. So, it's a pretty easy change.

Re: [VFS] Softening the exceptions...

2010-10-25 Thread Ralph Goers
On Oct 25, 2010, at 9:01 AM, James Carman wrote: On Mon, Oct 25, 2010 at 11:49 AM, Ralph Goers ralph.go...@dslextreme.com wrote: I'm not in favor of changing much at this point. I'd really like to get a release done without too many more changes. There's a problem with that, Ralph. If

Re: [VFS] Softening the exceptions...

2010-10-25 Thread James Carman
On Mon, Oct 25, 2010 at 7:44 PM, Ralph Goers ralph.go...@dslextreme.com wrote: This code has been sitting here for a year. Commons Configuration would like to do a release but cannot until VFS is released. I'd like to work on the VFS release during the hackathon next week. If you believe you