Titanium JIRA Archive
Alloy (ALOY)

[ALOY-250] Alloy should throw errors on XML formatting failures

GitHub Issuen/a
Resolution Date2012-09-14T07:50:41.000+0000
Affected Version/sn/a
Fix Version/s2012 Sprint 19, Release 3.0.0
ReporterTony Lukasavage


It seems as though XML formatting errors are being reported in the log, but not aborting the Alloy build process. For example:
	<Window32 id="index">
		<Button id="b" class="button" onClick="showAlert">Hello, World!</Button>
This causes the following error message to appear in the log:
end tag name: Window is not match the current start tagName:Window32
But it does not abort the build until a later error forces it to. These XML errors should be caught when they occur and conveyed to the developer so that they can fix them before the app runs, not simply warn them and have them encounter unexpected behavior.


  1. Tony Lukasavage 2012-09-12

    I tracked down why we don't get exceptions on malformed XML and only warnings: https://github.com/jindw/xmldom/blob/master/dom-parser.js#L71 I have logged and issue with xmldom, but I'm not sure how long it will take to get a change in place, if the developer wants to do it at all. We may have to consider forking and submitting a PR, or looking for a XML validator just for this purpose. https://github.com/jindw/xmldom/issues/36
  2. Tony Lukasavage 2012-09-14

    Problem solved, but logged ALOY-267 to continue work towards an even better solution.

JSON Source