aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/src
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-11-26 14:14:22 +0100
committerPatrik Nyblom <[email protected]>2010-11-30 16:33:58 +0100
commit94eda4f777d79b159f0b6fd5ff5519649aa5affb (patch)
treea1acca65368d26076ea12945bbde812f1115800d /erts/preloaded/src
parent561617f5ce8ac04e52ebb6cac2b131850a787869 (diff)
downloadotp-94eda4f777d79b159f0b6fd5ff5519649aa5affb.tar.gz
otp-94eda4f777d79b159f0b6fd5ff5519649aa5affb.tar.bz2
otp-94eda4f777d79b159f0b6fd5ff5519649aa5affb.zip
Teach prim_file not to accept atoms and not to throw exceptions
Diffstat (limited to 'erts/preloaded/src')
-rw-r--r--erts/preloaded/src/prim_file.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/erts/preloaded/src/prim_file.erl b/erts/preloaded/src/prim_file.erl
index 75b0faacd3..10be852e92 100644
--- a/erts/preloaded/src/prim_file.erl
+++ b/erts/preloaded/src/prim_file.erl
@@ -1228,5 +1228,7 @@ reverse(X) -> lists:reverse(X, []).
reverse(L, T) -> lists:reverse(L, T).
% Will add zero termination too
+% The 'EXIT' tuple from a bad argument will eventually generate an error
+% in list_to_binary, which is caught and generates the {error,badarg} return
pathname(File) ->
- prim_file:internal_name2native(File).
+ (catch prim_file:internal_name2native(File)).