Skip to content

Commit

Permalink
Catch correct exception
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg committed Apr 8, 2019
1 parent d719da5 commit 48fbbbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/file_tree.ml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ type readdir =

let readdir path =
match Path.readdir_unsorted path with
| exception (Unix.Unix_error (error, _, _)) ->
| exception (Sys_error msg) ->
Errors.warn Loc.none
"Unable to read directory %a@. Ignoring. \
Remove this message by ignoring by adding:@.\
Expand All @@ -195,7 +195,7 @@ let readdir path =
Path.pp path
(Path.basename path)
Path.pp (Path.relative (Path.parent_exn path) "dune")
(Unix.error_message error);
msg;
Error error
| unsorted_contents ->
let files, dirs =
Expand Down

0 comments on commit 48fbbbd

Please sign in to comment.