If a parse error occurred anywhere inside the XML, the Nokogiri parser just returns whatever happens to be on top of the stack. This makes it very hard to troubleshoot the error down the line.
To avoid this we need to implement the error method and raise an error. This introduces a new exception type Nori::ParseError which we also need to raise in the REXML parser to make it symmetric.
If a parse error occurred anywhere inside the XML, the Nokogiri parser just returns whatever happens to be on top of the stack. This makes it very hard to troubleshoot the error down the line.
To avoid this we need to implement the
error
method and raise an error. This introduces a new exception typeNori::ParseError
which we also need to raise in the REXML parser to make it symmetric.