aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/src
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-11-09 11:40:59 +0100
committerBjörn-Egil Dahlberg <[email protected]>2016-11-09 11:40:59 +0100
commite3b904f938f02904220d509e3abc58b81861756a (patch)
tree99b5f1aa9e0399a133293cf1cb0b12d2a368b050 /erts/preloaded/src
parent3f14d19422844e3443128e035be24c64347aecc9 (diff)
parent2bc52f6dd31d114b1a2d3cb7ad0a12b0b209beff (diff)
downloadotp-e3b904f938f02904220d509e3abc58b81861756a.tar.gz
otp-e3b904f938f02904220d509e3abc58b81861756a.tar.bz2
otp-e3b904f938f02904220d509e3abc58b81861756a.zip
Merge branch 'maint'
Conflicts: OTP_VERSION
Diffstat (limited to 'erts/preloaded/src')
-rw-r--r--erts/preloaded/src/erl_prim_loader.erl23
1 files changed, 12 insertions, 11 deletions
diff --git a/erts/preloaded/src/erl_prim_loader.erl b/erts/preloaded/src/erl_prim_loader.erl
index b3ec73a60e..1d09aeded9 100644
--- a/erts/preloaded/src/erl_prim_loader.erl
+++ b/erts/preloaded/src/erl_prim_loader.erl
@@ -555,17 +555,18 @@ efile_gm_get(Paths, Mod, ParentRef, Process) ->
efile_gm_get_1([P|Ps], File0, Mod, {Parent,Ref}=PR, Process) ->
File = join(P, File0),
- Res = try prim_file:read_file(File) of
- {ok,Bin} ->
- gm_process(Mod, File, Bin, Process);
- Error ->
- _ = check_file_result(get_modules, File, Error),
- efile_gm_get_1(Ps, File0, Mod, PR, Process)
- catch
- _:Reason ->
- {error,{crash,Reason}}
- end,
- Parent ! {Ref,Mod,Res};
+ try prim_file:read_file(File) of
+ {ok,Bin} ->
+ Res = gm_process(Mod, File, Bin, Process),
+ Parent ! {Ref,Mod,Res};
+ Error ->
+ _ = check_file_result(get_modules, File, Error),
+ efile_gm_get_1(Ps, File0, Mod, PR, Process)
+ catch
+ _:Reason ->
+ Res = {error,{crash,Reason}},
+ Parent ! {Ref,Mod,Res}
+ end;
efile_gm_get_1([], _, Mod, {Parent,Ref}, _Process) ->
Parent ! {Ref,Mod,{error,enoent}}.