Skip to content

Commit

Permalink
Display a better error message when the internet connection is down.
Browse files Browse the repository at this point in the history
  • Loading branch information
samoht committed Sep 22, 2012
1 parent 32ccf26 commit 1630990
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/run.ml
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,11 @@ let download ~filename:src ~dirname:dst =
[ "rm"; "-f"; dst_file ];
[ "cp"; src; dst ]
]
else
in_dir dst (fun () -> command cmd);
else (
try in_dir dst (fun () -> command cmd)
with _ ->
Globals.error_and_exit "Cannot download %s, please check your connection settings." src
);
dst_file

let patch p =
Expand Down

0 comments on commit 1630990

Please sign in to comment.