diff options
author | Lars Thorsen <[email protected]> | 2017-02-17 08:01:18 +0100 |
---|---|---|
committer | Lars Thorsen <[email protected]> | 2017-02-22 10:00:19 +0100 |
commit | 71ee7ed52d51d10a4c8c3b9e1de0a3a1df57a1b6 (patch) | |
tree | 06271740127582ad63d8aec1c609f302815df7ee /lib | |
parent | 760a3fa3c57fa2b56b44a9c25cbab4df0f71987e (diff) | |
download | otp-71ee7ed52d51d10a4c8c3b9e1de0a3a1df57a1b6.tar.gz otp-71ee7ed52d51d10a4c8c3b9e1de0a3a1df57a1b6.tar.bz2 otp-71ee7ed52d51d10a4c8c3b9e1de0a3a1df57a1b6.zip |
[xmerl] Remove faulty throws
Diffstat (limited to 'lib')
-rw-r--r-- | lib/xmerl/src/xmerl_sax_parser.erl | 6 | ||||
-rw-r--r-- | lib/xmerl/src/xmerl_sax_parser_base.erlsrc | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/xmerl/src/xmerl_sax_parser.erl b/lib/xmerl/src/xmerl_sax_parser.erl index 9b5429cffe..1aef6c58c4 100644 --- a/lib/xmerl/src/xmerl_sax_parser.erl +++ b/lib/xmerl/src/xmerl_sax_parser.erl @@ -99,7 +99,7 @@ stream(Xml, Options) -> stream(Xml, Options, InputType) when is_list(Xml), is_list(Options) -> State = parse_options(Options, initial_state()), - case State#xmerl_sax_parser_state.file_type of + case State#xmerl_sax_parser_state.file_type of dtd -> xmerl_sax_parser_list:parse_dtd(Xml, State#xmerl_sax_parser_state{encoding = list, @@ -231,12 +231,12 @@ check_encoding_option(E) -> %% Description: Detects which character set is used in a binary stream. %%---------------------------------------------------------------------- detect_charset(<<>>, #xmerl_sax_parser_state{continuation_fun = undefined} = _) -> - throw({error, "Can't detect character encoding due to no indata"}); + {error, "Can't detect character encoding due to no indata"}; detect_charset(<<>>, #xmerl_sax_parser_state{continuation_fun = CFun, continuation_state = CState} = State) -> case CFun(CState) of {<<>>, _} -> - throw({error, "Can't detect character encoding due to lack of indata"}); + {error, "Can't detect character encoding due to lack of indata"}; {NewBytes, NewContState} -> detect_charset(NewBytes, State#xmerl_sax_parser_state{continuation_state = NewContState}) end; diff --git a/lib/xmerl/src/xmerl_sax_parser_base.erlsrc b/lib/xmerl/src/xmerl_sax_parser_base.erlsrc index 39dd3bbff3..2b9b37b5f3 100644 --- a/lib/xmerl/src/xmerl_sax_parser_base.erlsrc +++ b/lib/xmerl/src/xmerl_sax_parser_base.erlsrc @@ -93,7 +93,7 @@ parse(Xml, State) -> Other -> _State2 = event_callback(endDocument, State1), ets:delete(RefTable), - throw(Other) + {fatal_error, Other} end. %%---------------------------------------------------------------------- @@ -128,7 +128,7 @@ parse_dtd(Xml, State) -> Other -> _State2 = event_callback(endDocument, State1), ets:delete(RefTable), - throw(Other) + {fatal_error, Other} end. |