Yup, meant to and it escaped me.
 On Sep 14, 2013 8:14 AM, "Josh Albrecht" <notifications@github.com> wrote:

> In src/main/scala/com/codexica/s3crate/filetree/local/LinuxFileTree.scala:
>
> > +
> > +  private def getPath(file: File): Path = {
> > +    //check for null parameter
> > +    if (file == null) throw new InaccessibleDataError("file parameter cannot be null", null)
> > +    try {
> > +      //get Path from File
> > +      val path = Paths.get(file.toURI())
> > +      //check existence
> > +      if (Files.notExists(path)) throw new FileMissingError("file does not exist", null)
> > +      //check for read permissions
> > +      if (!Files.isReadable(path)) throw new FilePermissionError("file is not readable", null)
> > +      path
> > +    } catch {
> > +      //catch exceptions and route to custom exceptions
> > +      case ex: InvalidPathException => throw new InaccessibleDataError("file path is invalid", ex)
> > +      case ex: IllegalArgumentException => throw new InaccessibleDataError("", ex)
>
> It's important to generate a message for exceptions (instead of
> empty-string). Worst case, you can always call ex.getMessage().
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/joshalbrecht/s3crate/pull/1/files#r6363988>
> .
>