Skip to content

Commit 2fe37a2

Browse files
committed
XMLParser: Handle the parse result.
1 parent e724ba0 commit 2fe37a2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Foundation/XMLParser.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,16 +465,18 @@ open class XMLParser : NSObject {
465465
}
466466

467467
internal func _handleParseResult(_ parseResult: Int32) -> Bool {
468-
return true
469-
/*
470468
var result = true
471469
if parseResult != 0 {
472470
if parseResult != -1 {
473471
// TODO: determine if this result is a fatal error from libxml via the CF implementations
474472
}
473+
474+
if _parserError == nil {
475+
_parserError = NSError(domain: XMLParser.errorDomain, code: Int(parseResult))
476+
}
477+
result = false
475478
}
476479
return result
477-
*/
478480
}
479481

480482
internal func parseData(_ data: Data) -> Bool {

0 commit comments

Comments
 (0)