You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gary Gregory <ga...@gmail.com> on 2019/04/19 14:07:05 UTC

[VFS] Exceptions in new file filter code

Hi All:

In our new file filters ported from Commons IO, we have code like:

        } catch (final FileSystemException ex) {
            throw new RuntimeException(ex);
        }

I propose instead that we have the accept() methods throw
FileSystemException directly.

Gary

Re: [VFS] Exceptions in new file filter code

Posted by Otto Fowler <ot...@gmail.com>.
+1 then, from looking at the code, I don’t see why RuntimeException would
be required there.


On April 19, 2019 at 12:38:02, Gary Gregory (garydgregory@gmail.com) wrote:

On Fri, Apr 19, 2019 at 11:38 AM Otto Fowler <ot...@gmail.com>
wrote:

> Where these written to be used as lambdas?
>

They were not. These were written a long time ago as part of Apache Commons
IO and recently ported to VFS.

Gary


>
>
> On April 19, 2019 at 10:07:28, Gary Gregory (garydgregory@gmail.com)
> wrote:
>
> Hi All:
>
> In our new file filters ported from Commons IO, we have code like:
>
> } catch (final FileSystemException ex) {
> throw new RuntimeException(ex);
> }
>
> I propose instead that we have the accept() methods throw
> FileSystemException directly.
>
> Gary
>

Re: [VFS] Exceptions in new file filter code

Posted by Gary Gregory <ga...@gmail.com>.
On Fri, Apr 19, 2019 at 11:38 AM Otto Fowler <ot...@gmail.com>
wrote:

> Where these written to be used as lambdas?
>

They were not. These were written a long time ago as part of Apache Commons
IO and recently ported to VFS.

Gary


>
>
> On April 19, 2019 at 10:07:28, Gary Gregory (garydgregory@gmail.com)
> wrote:
>
> Hi All:
>
> In our new file filters ported from Commons IO, we have code like:
>
> } catch (final FileSystemException ex) {
> throw new RuntimeException(ex);
> }
>
> I propose instead that we have the accept() methods throw
> FileSystemException directly.
>
> Gary
>

Re: [VFS] Exceptions in new file filter code

Posted by Otto Fowler <ot...@gmail.com>.
Where these written to be used as lambdas?


On April 19, 2019 at 10:07:28, Gary Gregory (garydgregory@gmail.com) wrote:

Hi All:

In our new file filters ported from Commons IO, we have code like:

} catch (final FileSystemException ex) {
throw new RuntimeException(ex);
}

I propose instead that we have the accept() methods throw
FileSystemException directly.

Gary