* xmlCtxtSetErrorHandler: * @ctxt: an XML parser context * @handler: error handler * @data: data for error handler * * Register a callback function that will be called on errors and * warnings. If handler is NULL, the error handler will be deactivated. * * This is the recommended way to collect errors from the parser and * takes precedence over all other error reporting mechanisms. *
| 112 | * Available since 2.13.0. |
| 113 | */ |
| 114 | void |
| 115 | xmlCtxtSetErrorHandler(xmlParserCtxtPtr ctxt, xmlStructuredErrorFunc handler, |
| 116 | void *data) |
| 117 | { |
| 118 | if (ctxt == NULL) |
| 119 | return; |
| 120 | ctxt->errorHandler = handler; |
| 121 | ctxt->errorCtxt = data; |
| 122 | } |
| 123 | |
| 124 | /** |
| 125 | * xmlCtxtErrMemory: |
no outgoing calls