<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFXMLParserHandleErrorCallBack",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@T@CFXMLParserHandleErrorCallBack"
  },
  "title" : "CFXMLParserHandleErrorCallBack"
}
-->

# CFXMLParserHandleErrorCallBack

Callback function invoked by the parser to notify your application that an error has occurred.

```
typealias CFXMLParserHandleErrorCallBack = (CFXMLParser?, CFXMLParserStatusCode, UnsafeMutableRawPointer?) -> DarwinBoolean
```

## Parameters

`parser`

A CFXMLParser object making the callback.

`error`

A status code describing the error.

`info`

The program-defined context data you specified in the [`CFXMLParserContext`](/documentation/CoreFoundation/CFXMLParserContext) structure when creating the parser.

## Return Value

`true` if the parser should continue parsing the XML, `false` if the parser should stop.

## Discussion

If this callback is not defined, the parser will silently attempt to recover. Otherwise, this callback may return false to force the parser to stop. If this callback returns true, the parser will attempt to recover (fatal errors will still cause the parse to abort immediately). This callback is optional.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)