Permalink
Browse files

Was not matching file:open error return

  • Loading branch information...
1 parent 2130917 commit 90b87dbce002a0a8e4667341550680e686f41a3c @robspassky committed Jun 8, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 webservice-project/myproj_cowboy_default.erl
@@ -38,7 +38,9 @@ handle(Req, S) ->
{FullPath, Req1} = get_full_path(Req, S),
case open_file(FullPath) of
{ok, IoDevice} -> reply_full_file(Req1, FullPath, IoDevice, S);
- error -> reply_error(Req1, S)
+ {error, Reason} -> error_logger:error_report([{file, FullPath}, {reason, Reason}]),
+ reply_error(Req1, S);
+ _ -> error_logger:error_report([{file, FullPath}, {reason, "unkown file:open error"}])
end.
terminate(_Req, _State) ->

0 comments on commit 90b87db

Please sign in to comment.