From the docstring I figured IDE was the lowest exception you wanted
thrown. To follow your lead, it is probably better then to remove it and
let the exception itself be thrown, rather than picking it and wrapping
with anything.
 On Sep 14, 2013 8:21 AM, "Josh Albrecht" <notifications@github.com> wrote:

> In src/main/scala/com/codexica/s3crate/filetree/local/LinuxFileTree.scala:
>
> > @@ -19,7 +61,26 @@ class LinuxFileTree(baseFolder: File, ec: ExecutionContext) extends LocalFileTre
> >     * @throws InaccessibleDataError wrapping all other non fatal errors
> >     * @return Return the appropriate FilePathType (folder, file, or symlink)
> >     */
> > -  def getFileType(file: File): FilePathType = throw new NotImplementedError()
> > +  def getFileType(file: File): FilePathType = {
> > +    //get Path from File
> > +    val path = getPath(file)
> > +    try {
> > +      //check for SymLink
> > +      if (Files.isSymbolicLink(path)) SymLinkType()
> > +      //check for directory
> > +      else if (Files.isDirectory(path)) FolderType()
> > +      //check for file (we can probably skip this check and return FileType, as no other
> > +      //option currently exists. This is a precaution against the unknown
> > +      else if (Files.isRegularFile(path)) FileType()
> > +      //if not check succeeded - throw our generic InaccessibleDataError
> > +      else throw new InaccessibleDataError("wierd error. path is not a file, a directory or a symlink", null)
>
> Again, I'd raise a different kind of error here. Probably a raw Exception
> because it should NOT be handled--it's a violation of my assumptions that
> something is always going to be one of those three.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/joshalbrecht/s3crate/pull/1/files#r6364011>
> .
>