Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

* src/yaws_ctl.erl: Process the case when ctlfile is parseable but its

  content is invalid.
  • Loading branch information...
commit 421623c5d7632705e1b1c84082b033b9a2ac94a3 1 parent c6772e2
Sergei Golovan authored

Showing 1 changed file with 9 additions and 0 deletions. Show diff stats Hide diff stats

  1. +9 0 src/yaws_ctl.erl
9 src/yaws_ctl.erl
@@ -397,6 +397,8 @@ connect_file(CtlFile) ->
397 397 Err ->
398 398 Err
399 399 end;
  400 + {ok, Terms} ->
  401 + {error, {content, Terms}};
400 402 Err ->
401 403 Err
402 404 end.
@@ -417,6 +419,13 @@ actl(SID, Term) ->
417 419 io:format("No yaws system responds~n",[]),
418 420 timer:sleep(10),
419 421 erlang:halt(2);
  422 + {error, {content,Terms}} ->
  423 + io:format("The ctlfile ~s is readable but its content~n"
  424 + "~p~n"
  425 + "isn't in YAWS control file format~n",
  426 + [yaws:ctl_file(SID),Terms]),
  427 + timer:sleep(10),
  428 + erlang:halt(2);
420 429 {error, Reason} ->
421 430 io:format("You failed to read the ctlfile ~s~n"
422 431 "error was: <~p>~n"

0 comments on commit 421623c

Please sign in to comment.
Something went wrong with that request. Please try again.