aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-06-17 11:06:52 +0200
committerBjörn Gustavsson <[email protected]>2014-06-17 11:06:52 +0200
commitef1a60edd1cb8f1fffc4fa3b1995914efff5393d (patch)
tree62815b12dcb69906b2145a54b17d383438d4a213 /lib/stdlib
parentefcd03504202c288047311368a729bc83f71ecaa (diff)
parenta182917681b28ec7129adf73d863fa6b11670c10 (diff)
downloadotp-ef1a60edd1cb8f1fffc4fa3b1995914efff5393d.tar.gz
otp-ef1a60edd1cb8f1fffc4fa3b1995914efff5393d.tar.bz2
otp-ef1a60edd1cb8f1fffc4fa3b1995914efff5393d.zip
Merge branch 'maint'
* maint: Fix handling of latin1 characters in false ifdef branches add_abstract_code: Remove 'from_asm' option Remove documentation and stub for non-exist file:file_info/1
Diffstat (limited to 'lib/stdlib')
-rw-r--r--lib/stdlib/src/epp.erl16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/stdlib/src/epp.erl b/lib/stdlib/src/epp.erl
index 9b506b0a44..5f8637c118 100644
--- a/lib/stdlib/src/epp.erl
+++ b/lib/stdlib/src/epp.erl
@@ -1121,8 +1121,20 @@ skip_toks(From, St, [I|Sis]) ->
skip_toks(From, St#epp{location=Cl}, Sis);
{ok,_Toks,Cl} ->
skip_toks(From, St#epp{location=Cl}, [I|Sis]);
- {error,_E,Cl} ->
- skip_toks(From, St#epp{location=Cl}, [I|Sis]);
+ {error,E,Cl} ->
+ case E of
+ {_,file_io_server,invalid_unicode} ->
+ %% The compiler needs to know that there was
+ %% invalid unicode characters in the file
+ %% (and there is no point in continuing anyway
+ %% since io server process has terminated).
+ epp_reply(From, {error,E}),
+ leave_file(wait_request(St), St);
+ _ ->
+ %% Some other invalid token, such as a bad floating
+ %% point number. Just ignore it.
+ skip_toks(From, St#epp{location=Cl}, [I|Sis])
+ end;
{eof,Cl} ->
leave_file(From, St#epp{location=Cl,istk=[I|Sis]});
{error,_E} ->