8000 Missing type crashes erlsom · Issue #13 · willemdj/erlsom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
8000 Skip to content
Missing type crashes erlsom #13
Open
@dLuna

Description

@dLuna

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0