Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4713] Android: XML Documents with Errors Not Throwing Exceptions

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-07-27T10:28:10.000+0000
Affected Version/sRelease 1.7.0
Fix Version/sSprint 2011-30, Release 1.8.0
ComponentsAndroid
Labelsparity
ReporterDon Thorp
AssigneeBill Dawson
Created2011-07-19T09:13:19.000+0000
Updated2011-08-26T15:03:56.000+0000

Description

We're eating the exceptions, they should propagate according to the xml spec.
// Parse (some types of) invalid documents
valueOf(function() {
	Ti.XML.parseString(localInvalid["mismatched_tag.xml"]);
}).shouldThrowException();
valueOf(function() {
	Ti.XML.parseString(localInvalid["no_end.xml"]);
}).shouldThrowException();
valueOf(function() {
	Ti.XML.parseString(localInvalid["no_toplevel.xml"]);
}).shouldThrowException();

Comments

  1. Anirudh Nagesh 2011-07-21

    Associated Helpdesk ticket

    appc.me/c/APP-831275 Also, have added the customer priority
  2. Bill Dawson 2011-07-26

    Pull request ready: https://github.com/appcelerator/titanium_mobile/pull/290
  3. Natalie Huynh 2011-08-26

    Tested with: version=1.8.0 timestamp=08/26/11 14:21 githash=0e2031e Android Emulator 2.1 and 3.2

JSON Source