| <!DOCTYPE html> |
| <!--[if IE]><![endif]--> |
| <html> |
| |
| <head> |
| <meta charset="utf-8"> |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| <title>Interface IErrorHandler |
| | Apache Lucene.NET 4.8.0-beta00011 Documentation </title> |
| <meta name="viewport" content="width=device-width"> |
| <meta name="title" content="Interface IErrorHandler |
| | Apache Lucene.NET 4.8.0-beta00011 Documentation "> |
| <meta name="generator" content="docfx 2.56.0.0"> |
| |
| <link rel="shortcut icon" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/logo/favicon.ico"> |
| <link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.vendor.css"> |
| <link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.css"> |
| <link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/main.css"> |
| <meta property="docfx:navrel" content="toc.html"> |
| <meta property="docfx:tocrel" content="benchmark/toc.html"> |
| |
| <meta property="docfx:rel" content="https://lucenenet.apache.org/docs/4.8.0-beta00009/"> |
| |
| </head> |
| <body data-spy="scroll" data-target="#affix" data-offset="120"> |
| <div id="wrapper"> |
| <header> |
| |
| <nav id="autocollapse" class="navbar ng-scope" role="navigation"> |
| <div class="container"> |
| <div class="navbar-header"> |
| <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar"> |
| <span class="sr-only">Toggle navigation</span> |
| <span class="icon-bar"></span> |
| <span class="icon-bar"></span> |
| <span class="icon-bar"></span> |
| </button> |
| |
| <a class="navbar-brand" href="/"> |
| <img id="logo" class="svg" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/logo/lucene-net-color.png" alt=""> |
| </a> |
| </div> |
| <div class="collapse navbar-collapse" id="navbar"> |
| <form class="navbar-form navbar-right" role="search" id="search"> |
| <div class="form-group"> |
| <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off"> |
| </div> |
| </form> |
| </div> |
| </div> |
| </nav> |
| |
| <div class="subnav navbar navbar-default"> |
| <div class="container hide-when-search"> |
| <ul class="level0 breadcrumb"> |
| <li> |
| <a href="https://lucenenet.apache.org/docs/4.8.0-beta00009/">API</a> |
| <span id="breadcrumb"> |
| <ul class="breadcrumb"> |
| <li></li> |
| </ul> |
| </span> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </header> |
| <div class="container body-content"> |
| |
| <div id="search-results"> |
| <div class="search-list"></div> |
| <div class="sr-items"> |
| <p><i class="glyphicon glyphicon-refresh index-loading"></i></p> |
| </div> |
| <ul id="pagination"></ul> |
| </div> |
| </div> |
| <div role="main" class="container body-content hide-when-search"> |
| |
| <div class="sidenav hide-when-search"> |
| <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a> |
| <div class="sidetoggle collapse" id="sidetoggle"> |
| <div id="sidetoc"></div> |
| </div> |
| </div> |
| <div class="article row grid-right"> |
| <div class="col-md-10"> |
| <article class="content wrap" id="_content" data-uid="Sax.IErrorHandler"> |
| |
| |
| <h1 id="Sax_IErrorHandler" data-uid="Sax.IErrorHandler" class="text-break">Interface IErrorHandler |
| </h1> |
| <div class="markdown level0 summary"><p>Basic interface for SAX error handlers.</p> |
| </div> |
| <div class="markdown level0 conceptual"></div> |
| <h6><strong>Namespace</strong>: <a class="xref" href="Sax.html">Sax</a></h6> |
| <h6><strong>Assembly</strong>: Lucene.Net.Benchmark.dll</h6> |
| <h5 id="Sax_IErrorHandler_syntax">Syntax</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">public interface IErrorHandler</code></pre> |
| </div> |
| <h5 id="Sax_IErrorHandler_remarks"><strong>Remarks</strong></h5> |
| <div class="markdown level0 remarks"><p><em>This module, both source code and documentation, is in the |
| Public Domain, and comes with<strong> NO WARRANTY</strong>.</em> |
| See<a href="http://www.saxproject.org">http://www.saxproject.org</a> |
| for further information. |
| <p> |
| If a SAX application needs to implement customized error |
| handling, it must implement this interface and then register an |
| instance with the XML reader using the |
| <a class="xref" href="Sax.IXMLReader.html#Sax_IXMLReader_ErrorHandler">ErrorHandler</a> |
| property. The parser will then report all errors and warnings |
| through this interface. |
| <p> |
| <strong>WARNING:</strong> If an application does <em>not</em> |
| register an ErrorHandler, XML parsing errors will go unreported, |
| except that<em> SAXParseException</em>s will be thrown for fatal errors. |
| In order to detect validity errors, an ErrorHandler that does something |
| with <a class="xref" href="Sax.IErrorHandler.html#Sax_IErrorHandler_Error_Sax_SAXParseException_">Error(SAXParseException)</a> calls must be registered. |
| <p> |
| For XML processing errors, a SAX driver must use this interface |
| in preference to throwing an exception: it is up to the application |
| to decide whether to throw an exception for different types of |
| errors and warnings.Note, however, that there is no requirement that |
| the parser continue to report additional errors after a call to |
| <a class="xref" href="Sax.IErrorHandler.html#Sax_IErrorHandler_FatalError_Sax_SAXParseException_">FatalError(SAXParseException)</a>. In other words, a SAX driver class |
| may throw an exception after reporting any fatalError. |
| Also parsers may throw appropriate exceptions for non - XML errors. |
| For example, <a class="xref" href="Sax.IXMLReader.html#Sax_IXMLReader_Parse_Sax_InputSource_">Parse(InputSource)</a> would throw |
| an <span class="xref">System.IO.IOException</span> for errors accessing entities or the document.</p> |
| </div> |
| <h3 id="methods">Methods |
| </h3> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00011/websites/apidocs/apiSpec/new?filename=Sax_IErrorHandler_Error_Sax_SAXParseException_.md&value=---%0Auid%3A%20Sax.IErrorHandler.Error(Sax.SAXParseException)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net.Benchmark/Support/Sax/ErrorHandler.cs/#L94">View Source</a> |
| </span> |
| <a id="Sax_IErrorHandler_Error_" data-uid="Sax.IErrorHandler.Error*"></a> |
| <h4 id="Sax_IErrorHandler_Error_Sax_SAXParseException_" data-uid="Sax.IErrorHandler.Error(Sax.SAXParseException)">Error(SAXParseException)</h4> |
| <div class="markdown level1 summary"><p>Receive notification of a recoverable error.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">void Error(SAXParseException exception)</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="Sax.SAXParseException.html">SAXParseException</a></td> |
| <td><span class="parametername">exception</span></td> |
| <td><p>The error information encapsulated in a SAX parse exception.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 id="Sax_IErrorHandler_Error_Sax_SAXParseException__remarks">Remarks</h5> |
| <div class="markdown level1 remarks"><p>This corresponds to the definition of "error" in section 1.2 |
| of the W3C XML 1.0 Recommendation.For example, a validating |
| parser would use this callback to report the violation of a |
| validity constraint.The default behaviour is to take no |
| action. |
| <p> |
| The SAX parser must continue to provide normal parsing |
| events after invoking this method: it should still be possible |
| for the application to process the document through to the end. |
| If the application cannot do so, then the parser should report |
| a fatal error even if the XML recommendation does not require |
| it to do so. |
| <p> |
| Filters may use this method to report other, non-XML errors |
| as well.</p> |
| </div> |
| <h5 class="exceptions">Exceptions</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Condition</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="Sax.SAXException.html">SAXException</a></td> |
| <td><p>Any SAX exception, possibly wrapping another exception.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 id="Sax_IErrorHandler_Error_Sax_SAXParseException__seealso">See Also</h5> |
| <div class="seealso"> |
| <div><a class="xref" href="Sax.SAXParseException.html">SAXParseException</a></div> |
| </div> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00011/websites/apidocs/apiSpec/new?filename=Sax_IErrorHandler_FatalError_Sax_SAXParseException_.md&value=---%0Auid%3A%20Sax.IErrorHandler.FatalError(Sax.SAXParseException)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net.Benchmark/Support/Sax/ErrorHandler.cs/#L122">View Source</a> |
| </span> |
| <a id="Sax_IErrorHandler_FatalError_" data-uid="Sax.IErrorHandler.FatalError*"></a> |
| <h4 id="Sax_IErrorHandler_FatalError_Sax_SAXParseException_" data-uid="Sax.IErrorHandler.FatalError(Sax.SAXParseException)">FatalError(SAXParseException)</h4> |
| <div class="markdown level1 summary"><p>Receive notification of a non-recoverable error.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">void FatalError(SAXParseException exception)</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="Sax.SAXParseException.html">SAXParseException</a></td> |
| <td><span class="parametername">exception</span></td> |
| <td><p>The error information encapsulated in a SAX parse exception.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 id="Sax_IErrorHandler_FatalError_Sax_SAXParseException__remarks">Remarks</h5> |
| <div class="markdown level1 remarks"><p><strong>There is an apparent contradiction between the |
| documentation for this method and the documentation for |
| <a class="xref" href="Sax.IContentHandler.html#Sax_IContentHandler_EndDocument">EndDocument()</a>. Until this ambiguity |
| is resolved in a future major release, clients should make no |
| assumptions about whether EndDocument() will or will not be |
| invoked when the parser has reported a FatalError() or thrown |
| an exception.</strong> |
| <p> |
| This corresponds to the definition of "fatal error" in |
| section 1.2 of the W3C XML 1.0 Recommendation.For example, a |
| parser would use this callback to report the violation of a |
| well-formedness constraint. |
| <p> |
| The application must assume that the document is unusable |
| after the parser has invoked this method, and should continue |
| (if at all) only for the sake of collecting additional error |
| messages: in fact, SAX parsers are free to stop reporting any |
| other events once this method has been invoked.</p> |
| </div> |
| <h5 class="exceptions">Exceptions</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Condition</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="Sax.SAXException.html">SAXException</a></td> |
| <td><p>Any SAX exception, possibly wrapping another exception.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 id="Sax_IErrorHandler_FatalError_Sax_SAXParseException__seealso">See Also</h5> |
| <div class="seealso"> |
| <div><a class="xref" href="Sax.SAXParseException.html">SAXParseException</a></div> |
| </div> |
| <span class="small pull-right mobile-hide"> |
| <span class="divider">|</span> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00011/websites/apidocs/apiSpec/new?filename=Sax_IErrorHandler_Warning_Sax_SAXParseException_.md&value=---%0Auid%3A%20Sax.IErrorHandler.Warning(Sax.SAXParseException)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a> |
| </span> |
| <span class="small pull-right mobile-hide"> |
| <a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net.Benchmark/Support/Sax/ErrorHandler.cs/#L69">View Source</a> |
| </span> |
| <a id="Sax_IErrorHandler_Warning_" data-uid="Sax.IErrorHandler.Warning*"></a> |
| <h4 id="Sax_IErrorHandler_Warning_Sax_SAXParseException_" data-uid="Sax.IErrorHandler.Warning(Sax.SAXParseException)">Warning(SAXParseException)</h4> |
| <div class="markdown level1 summary"><p>Receive notification of a warning.</p> |
| </div> |
| <div class="markdown level1 conceptual"></div> |
| <h5 class="decalaration">Declaration</h5> |
| <div class="codewrapper"> |
| <pre><code class="lang-csharp hljs">void Warning(SAXParseException exception)</code></pre> |
| </div> |
| <h5 class="parameters">Parameters</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Name</th> |
| <th>Description</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="Sax.SAXParseException.html">SAXParseException</a></td> |
| <td><span class="parametername">exception</span></td> |
| <td><p>The warning information encapsulated in a SAX parse exception.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 id="Sax_IErrorHandler_Warning_Sax_SAXParseException__remarks">Remarks</h5> |
| <div class="markdown level1 remarks"><p>SAX parsers will use this method to report conditions that |
| are not errors or fatal errors as defined by the XML |
| recommendation.The default behaviour is to take no |
| action. |
| <p> |
| The SAX parser must continue to provide normal parsing events |
| after invoking this method: it should still be possible for the |
| application to process the document through to the end. |
| <p> |
| Filters may use this method to report other, non-XML warnings |
| as well.</p> |
| </div> |
| <h5 class="exceptions">Exceptions</h5> |
| <table class="table table-bordered table-striped table-condensed"> |
| <thead> |
| <tr> |
| <th>Type</th> |
| <th>Condition</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><a class="xref" href="Sax.SAXException.html">SAXException</a></td> |
| <td><p>Any SAX exception, possibly wrapping another exception.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <h5 id="Sax_IErrorHandler_Warning_Sax_SAXParseException__seealso">See Also</h5> |
| <div class="seealso"> |
| <div><a class="xref" href="Sax.SAXParseException.html">SAXParseException</a></div> |
| </div> |
| <h3 id="seealso">See Also</h3> |
| <div class="seealso"> |
| <div><a class="xref" href="Sax.IXMLReader.html#Sax_IXMLReader_ErrorHandler">ErrorHandler</a></div> |
| <div><a class="xref" href="Sax.SAXParseException.html">SAXParseException</a></div> |
| </div> |
| </article> |
| </div> |
| |
| <div class="hidden-sm col-md-2" role="complementary"> |
| <div class="sideaffix"> |
| <div class="contribution"> |
| <ul class="nav"> |
| <li> |
| <a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00011/websites/apidocs/apiSpec/new?filename=Sax_IErrorHandler.md&value=---%0Auid%3A%20Sax.IErrorHandler%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a> |
| </li> |
| <li> |
| <a href="https://github.com/apache/lucenenet/blob/release/Lucene.Net_4_8_0_beta00011/src/Lucene.Net.Benchmark/Support/Sax/ErrorHandler.cs/#L48" class="contribution-link">View Source</a> |
| </li> |
| </ul> |
| </div> |
| <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix"> |
| <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> --> |
| </nav> |
| </div> |
| </div> |
| </div> |
| </div> |
| |
| <footer> |
| <div class="grad-bottom"></div> |
| <div class="footer"> |
| <div class="container"> |
| <span class="pull-right"> |
| <a href="#top">Back to top</a> |
| </span> |
| Copyright © 2020 Licensed to the Apache Software Foundation (ASF) |
| |
| </div> |
| </div> |
| </footer> |
| </div> |
| |
| <script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.vendor.js"></script> |
| <script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.js"></script> |
| <script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/main.js"></script> |
| </body> |
| </html> |