瀏覽代碼

don't have undefined as the filename in errors if not found

pull/1882/head
Tristan Sloughter 6 年之前
父節點
當前提交
024e4bf81a
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. +4
    -4
      src/rebar_otp_app.erl

+ 4
- 4
src/rebar_otp_app.erl 查看文件

@ -59,8 +59,8 @@ compile(State, App) ->
format_error({missing_app_file, Filename}) ->
io_lib:format("App file is missing: ~ts", [Filename]);
format_error({file_read, File, Reason}) ->
io_lib:format("Failed to read required file ~ts for processing: ~ts", [File, file:format_error(Reason)]);
format_error({file_read, AppName, File, Reason}) ->
io_lib:format("Failed to read required ~ts file for processing the application '~ts': ~ts", [File, AppName, file:format_error(Reason)]);
format_error({invalid_name, File, AppName}) ->
io_lib:format("Invalid ~ts: name of application (~p) must match filename.", [File, AppName]).
@ -79,7 +79,7 @@ validate_app(State, App) ->
Error
end;
{error, Reason} ->
?PRV_ERROR({file_read, AppFile, Reason})
?PRV_ERROR({file_read, rebar_app_info:name(App), ".app", Reason})
end.
validate_app_modules(State, App, AppData) ->
@ -131,7 +131,7 @@ preprocess(State, AppInfo, AppSrcFile) ->
AppFile;
{error, Reason} ->
throw(?PRV_ERROR({file_read, AppSrcFile, Reason}))
throw(?PRV_ERROR({file_read, rebar_app_info:name(AppInfo), ".app.src", Reason}))
end.
load_app_vars(State) ->

Loading…
取消
儲存