Open
Description
While writing up the example for the other bug I stumbled across something else.
The TypeReference is a tuple and not an atom in this particular case so the error report crashes instead.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="whatnot" type="whatnot-type" />
</xs:schema>
<whatnot/>
> erlsom:scan(element(2, file:read_file("example.xml")), element(2, erlsom:compile_xsd_file("example.xsd"))).
** exception throw: {'EXIT',
{error,
[{exception,
{badarg,
[{erlang,atom_to_list,[{'#PCDATA',char}],[]},
{erlsom_lib,findType,6,
[{file,"src/erlsom_lib.erl"},{line,451}]},
{erlsom_parse,stateMachine,2,
[{file,"src/erlsom_parse.erl"},{line,376}]},
{erlsom_parse,xml2StructCallback,2,
[{file,"src/erlsom_parse.erl"},{line,295}]},
{erlsom_sax_utf8,wrapCallback,2,
[{file,"src/erlsom_sax_utf8.erl"},{line,1364}]},
{erlsom_sax_utf8,parseContentLT,2,
[{file,"src/erlsom_sax_utf8.erl"},{line,912}]},
{erlsom_sax_utf8,parse,2,
[{file,"src/erlsom_sax_utf8.erl"},{line,196}]},
{erlsom,scan2,3,
[{file,"src/erlsom.erl"},{line,211}]}]}},
{stack,[undefined]},
{received,{startElement,[],"whatnot",[],[]}}]}}
in function erlsom:scan2/3 (src/erlsom.erl, line 215)
Metadata
Metadata
Assignees
Labels
No labels