Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

handle parseable but invalid ctlfile

src/yaws_ctl.erl: Process the case when ctlfile is parseable but its
content is invalid.
  • Loading branch information...
commit 86dc31dd3e2099fba6769f1926bfab86fccb4c72 1 parent a40036a
@sgolovan sgolovan authored vinoski committed
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/yaws_ctl.erl
View
9 src/yaws_ctl.erl
@@ -397,6 +397,8 @@ connect_file(CtlFile) ->
Err ->
Err
end;
+ {ok, Terms} ->
+ {error, {content, Terms}};
Err ->
Err
end.
@@ -417,6 +419,13 @@ actl(SID, Term) ->
io:format("No yaws system responds~n",[]),
timer:sleep(10),
erlang:halt(2);
+ {error, {content,Terms}} ->
+ io:format("The ctlfile ~s is readable but its content~n"
+ "~p~n"
+ "isn't in YAWS control file format~n",
+ [yaws:ctl_file(SID),Terms]),
+ timer:sleep(10),
+ erlang:halt(2);
{error, Reason} ->
io:format("You failed to read the ctlfile ~s~n"
"error was: <~p>~n"
Please sign in to comment.
Something went wrong with that request. Please try again.