Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing type crashes erlsom #13

Open
dLuna opened this issue Aug 1, 2012 · 0 comments
Open

Missing type crashes erlsom #13

dLuna opened this issue Aug 1, 2012 · 0 comments

Comments

@dLuna
Copy link
Contributor

dLuna commented Aug 1, 2012

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant