diff options
author | Björn Gustavsson <[email protected]> | 2012-09-14 15:30:37 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2012-09-19 11:51:35 +0200 |
commit | 4be621ce3f116185500d6ef7282222cec3dc743e (patch) | |
tree | 7f672c5fd7ce661163e31bc2755a687b098bdd64 | |
parent | 50f98d7f0e1dc0ad7e882566b964f5c53b18609b (diff) | |
download | otp-4be621ce3f116185500d6ef7282222cec3dc743e.tar.gz otp-4be621ce3f116185500d6ef7282222cec3dc743e.tar.bz2 otp-4be621ce3f116185500d6ef7282222cec3dc743e.zip |
test_server_ctrl: Present "cannot create log dir" errors more neatly
-rw-r--r-- | lib/test_server/src/test_server_ctrl.erl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/test_server/src/test_server_ctrl.erl b/lib/test_server/src/test_server_ctrl.erl index 05ee1359ca..f5b43085b5 100644 --- a/lib/test_server/src/test_server_ctrl.erl +++ b/lib/test_server/src/test_server_ctrl.erl @@ -1873,7 +1873,7 @@ start_log_file() -> {error, eexist} -> ok; MkDirError -> - exit({cant_create_log_dir,{MkDirError,Dir}}) + log_file_error(MkDirError, Dir) end, TestDir = timestamp_filename_get(filename:join(Dir, "run.")), TestDir1 = @@ -1888,10 +1888,10 @@ start_log_file() -> ok -> TestDirX; MkDirError2 -> - exit({cant_create_log_dir,{MkDirError2,TestDirX}}) + log_file_error(MkDirError2, TestDirX) end; MkDirError2 -> - exit({cant_create_log_dir,{MkDirError2,TestDir}}) + log_file_error(MkDirError2, TestDir) end, ok = file:write_file(filename:join(Dir, ?last_file), TestDir1 ++ "\n"), ok = file:write_file(?last_file, TestDir1 ++ "\n"), @@ -1918,6 +1918,9 @@ start_log_file() -> test_server_sup:framework_call(report, [loginfo,LogInfo]), {ok,TestDir1}. +log_file_error(Error, Dir) -> + exit({cannot_create_log_dir,{Error,lists:flatten(Dir)}}). + make_html_link(LinkName, Target, Explanation) -> %% if possible use a relative reference to Target. TargetL = filename:split(Target), |