blob: 80e446419a77914f957763ffd0506d349eefd4ae [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Nov 22 17:12:57 EST 2007 -->
<TITLE>
Xalan-Java 2.7.1: Class ListingErrorHandler
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ListingErrorHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/xml/utils/IntVector.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/xml/utils/LocaleUtility.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="ListingErrorHandler.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.xml.utils</FONT>
<BR>
Class ListingErrorHandler</H2>
<PRE>
java.lang.Object
|
+--<B>org.apache.xml.utils.ListingErrorHandler</B>
</PRE>
<HR>
<DL>
<DT>public class <B>ListingErrorHandler</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../org/xml/sax/ErrorHandler.html">ErrorHandler</A>, <A HREF="../../../../javax/xml/transform/ErrorListener.html">ErrorListener</A></DL>
<P>
Sample implementation of similar SAX ErrorHandler and JAXP ErrorListener.
<p>This implementation is suitable for various use cases, and
provides some basic configuration API's as well to control
when we re-throw errors, etc.</p>
<P>
<DL>
<DT><B>Usage:</B><DD></DD>
</DL>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/ListingErrorHandler.html#ListingErrorHandler()">ListingErrorHandler</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor ListingErrorHandler; uses System.err.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/ListingErrorHandler.html#ListingErrorHandler(java.io.PrintWriter)">ListingErrorHandler</A></B>(java.io.PrintWriter&nbsp;pw)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor ListingErrorHandler; user-supplied PrintWriter.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/ListingErrorHandler.html#error(org.xml.sax.SAXParseException)">error</A></B>(<A HREF="../../../../org/xml/sax/SAXParseException.html">SAXParseException</A>&nbsp;exception)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Receive notification of a recoverable error.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/ListingErrorHandler.html#error(javax.xml.transform.TransformerException)">error</A></B>(<A HREF="../../../../javax/xml/transform/TransformerException.html">TransformerException</A>&nbsp;exception)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Receive notification of a recoverable error.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/ListingErrorHandler.html#fatalError(org.xml.sax.SAXParseException)">fatalError</A></B>(<A HREF="../../../../org/xml/sax/SAXParseException.html">SAXParseException</A>&nbsp;exception)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Receive notification of a non-recoverable error.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/ListingErrorHandler.html#fatalError(javax.xml.transform.TransformerException)">fatalError</A></B>(<A HREF="../../../../javax/xml/transform/TransformerException.html">TransformerException</A>&nbsp;exception)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Receive notification of a non-recoverable error.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/ListingErrorHandler.html#getThrowOnError()">getThrowOnError</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;User-settable behavior: when to re-throw exceptions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/ListingErrorHandler.html#getThrowOnFatalError()">getThrowOnFatalError</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;User-settable behavior: when to re-throw exceptions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/ListingErrorHandler.html#getThrowOnWarning()">getThrowOnWarning</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;User-settable behavior: when to re-throw exceptions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/ListingErrorHandler.html#logExceptionLocation(java.io.PrintWriter, java.lang.Throwable)">logExceptionLocation</A></B>(java.io.PrintWriter&nbsp;pw,
java.lang.Throwable&nbsp;exception)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print out location information about the exception.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/ListingErrorHandler.html#logSourceLine(java.io.PrintWriter, javax.xml.transform.SourceLocator)">logSourceLine</A></B>(java.io.PrintWriter&nbsp;pw,
<A HREF="../../../../javax/xml/transform/SourceLocator.html">SourceLocator</A>&nbsp;locator)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print out the specific source line that caused the exception,
if possible to load it.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/ListingErrorHandler.html#setThrowOnError(boolean)">setThrowOnError</A></B>(boolean&nbsp;b)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;User-settable behavior: when to re-throw exceptions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/ListingErrorHandler.html#setThrowOnFatalError(boolean)">setThrowOnFatalError</A></B>(boolean&nbsp;b)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;User-settable behavior: when to re-throw exceptions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/ListingErrorHandler.html#setThrowOnWarning(boolean)">setThrowOnWarning</A></B>(boolean&nbsp;b)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;User-settable behavior: when to re-throw exceptions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/ListingErrorHandler.html#warning(org.xml.sax.SAXParseException)">warning</A></B>(<A HREF="../../../../org/xml/sax/SAXParseException.html">SAXParseException</A>&nbsp;exception)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Receive notification of a warning.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/ListingErrorHandler.html#warning(javax.xml.transform.TransformerException)">warning</A></B>(<A HREF="../../../../javax/xml/transform/TransformerException.html">TransformerException</A>&nbsp;exception)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Receive notification of a warning.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="ListingErrorHandler(java.io.PrintWriter)"><!-- --></A><H3>
ListingErrorHandler</H3>
<PRE>
public <B>ListingErrorHandler</B>(java.io.PrintWriter&nbsp;pw)</PRE>
<DL>
<DD>Constructor ListingErrorHandler; user-supplied PrintWriter.</DL>
<HR>
<A NAME="ListingErrorHandler()"><!-- --></A><H3>
ListingErrorHandler</H3>
<PRE>
public <B>ListingErrorHandler</B>()</PRE>
<DL>
<DD>Constructor ListingErrorHandler; uses System.err.</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="warning(org.xml.sax.SAXParseException)"><!-- --></A><H3>
warning</H3>
<PRE>
public void <B>warning</B>(<A HREF="../../../../org/xml/sax/SAXParseException.html">SAXParseException</A>&nbsp;exception)
throws <A HREF="../../../../org/xml/sax/SAXException.html">SAXException</A></PRE>
<DL>
<DD>Receive notification of a warning.
<p>SAX parsers will use this method to report conditions that
are not errors or fatal errors as defined by the XML 1.0
recommendation. The default behaviour is to take no action.</p>
<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>
<p>Filters may use this method to report other, non-XML warnings
as well.</p><DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../org/xml/sax/ErrorHandler.html#warning(org.xml.sax.SAXParseException)">warning</A> in interface <A HREF="../../../../org/xml/sax/ErrorHandler.html">ErrorHandler</A><DT><B>Parameters:</B><DD><CODE>exception</CODE> - The warning information encapsulated in a
SAX parse exception.<DT><B>Throws:</B><DD><A HREF="../../../../org/xml/sax/SAXException.html">SAXException</A> - Any SAX exception, possibly
wrapping another exception; only if setThrowOnWarning is true.<DT><B>See Also: </B><DD><A HREF="../../../../org/xml/sax/SAXParseException.html"><CODE>SAXParseException</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="error(org.xml.sax.SAXParseException)"><!-- --></A><H3>
error</H3>
<PRE>
public void <B>error</B>(<A HREF="../../../../org/xml/sax/SAXParseException.html">SAXParseException</A>&nbsp;exception)
throws <A HREF="../../../../org/xml/sax/SAXException.html">SAXException</A></PRE>
<DL>
<DD>Receive notification of a recoverable error.
<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>
<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 1.0 recommendation does not require it to
do so.</p>
<p>Filters may use this method to report other, non-XML errors
as well.</p><DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../org/xml/sax/ErrorHandler.html#error(org.xml.sax.SAXParseException)">error</A> in interface <A HREF="../../../../org/xml/sax/ErrorHandler.html">ErrorHandler</A><DT><B>Parameters:</B><DD><CODE>exception</CODE> - The error information encapsulated in a
SAX parse exception.<DT><B>Throws:</B><DD><A HREF="../../../../org/xml/sax/SAXException.html">SAXException</A> - Any SAX exception, possibly
wrapping another exception; only if setThrowOnErroris true.<DT><B>See Also: </B><DD><A HREF="../../../../org/xml/sax/SAXParseException.html"><CODE>SAXParseException</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="fatalError(org.xml.sax.SAXParseException)"><!-- --></A><H3>
fatalError</H3>
<PRE>
public void <B>fatalError</B>(<A HREF="../../../../org/xml/sax/SAXParseException.html">SAXParseException</A>&nbsp;exception)
throws <A HREF="../../../../org/xml/sax/SAXException.html">SAXException</A></PRE>
<DL>
<DD>Receive notification of a non-recoverable error.
<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>
<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 addition error
messages: in fact, SAX parsers are free to stop reporting any
other events once this method has been invoked.</p><DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../org/xml/sax/ErrorHandler.html#fatalError(org.xml.sax.SAXParseException)">fatalError</A> in interface <A HREF="../../../../org/xml/sax/ErrorHandler.html">ErrorHandler</A><DT><B>Parameters:</B><DD><CODE>exception</CODE> - The error information encapsulated in a
SAX parse exception.<DT><B>Throws:</B><DD><A HREF="../../../../org/xml/sax/SAXException.html">SAXException</A> - Any SAX exception, possibly
wrapping another exception; only if setThrowOnFatalError is true.<DT><B>See Also: </B><DD><A HREF="../../../../org/xml/sax/SAXParseException.html"><CODE>SAXParseException</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="warning(javax.xml.transform.TransformerException)"><!-- --></A><H3>
warning</H3>
<PRE>
public void <B>warning</B>(<A HREF="../../../../javax/xml/transform/TransformerException.html">TransformerException</A>&nbsp;exception)
throws <A HREF="../../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Receive notification of a warning.
<p><A HREF="../../../../javax/xml/transform/Transformer.html"><CODE>Transformer</CODE></A> can use this method to report
conditions that are not errors or fatal errors. The default behaviour
is to take no action.</p>
<p>After invoking this method, the Transformer must continue with
the transformation. It should still be possible for the
application to process the document through to the end.</p><DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../javax/xml/transform/ErrorListener.html#warning(javax.xml.transform.TransformerException)">warning</A> in interface <A HREF="../../../../javax/xml/transform/ErrorListener.html">ErrorListener</A><DT><B>Parameters:</B><DD><CODE>exception</CODE> - The warning information encapsulated in a
transformer exception.<DT><B>Throws:</B><DD><A HREF="../../../../javax/xml/transform/TransformerException.html">TransformerException</A> - only if
setThrowOnWarning is true.<DT><B>See Also: </B><DD><A HREF="../../../../javax/xml/transform/TransformerException.html"><CODE>TransformerException</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="error(javax.xml.transform.TransformerException)"><!-- --></A><H3>
error</H3>
<PRE>
public void <B>error</B>(<A HREF="../../../../javax/xml/transform/TransformerException.html">TransformerException</A>&nbsp;exception)
throws <A HREF="../../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Receive notification of a recoverable error.
<p>The transformer must continue to try and provide normal transformation
after invoking this method. It should still be possible for the
application to process the document through to the end if no other errors
are encountered.</p><DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../javax/xml/transform/ErrorListener.html#error(javax.xml.transform.TransformerException)">error</A> in interface <A HREF="../../../../javax/xml/transform/ErrorListener.html">ErrorListener</A><DT><B>Parameters:</B><DD><CODE>exception</CODE> - The error information encapsulated in a
transformer exception.<DT><B>Throws:</B><DD><A HREF="../../../../javax/xml/transform/TransformerException.html">TransformerException</A> - only if
setThrowOnError is true.<DT><B>See Also: </B><DD><A HREF="../../../../javax/xml/transform/TransformerException.html"><CODE>TransformerException</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="fatalError(javax.xml.transform.TransformerException)"><!-- --></A><H3>
fatalError</H3>
<PRE>
public void <B>fatalError</B>(<A HREF="../../../../javax/xml/transform/TransformerException.html">TransformerException</A>&nbsp;exception)
throws <A HREF="../../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Receive notification of a non-recoverable error.
<p>The transformer must continue to try and provide normal transformation
after invoking this method. It should still be possible for the
application to process the document through to the end if no other errors
are encountered, but there is no guarantee that the output will be
useable.</p><DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../../javax/xml/transform/ErrorListener.html#fatalError(javax.xml.transform.TransformerException)">fatalError</A> in interface <A HREF="../../../../javax/xml/transform/ErrorListener.html">ErrorListener</A><DT><B>Parameters:</B><DD><CODE>exception</CODE> - The error information encapsulated in a
transformer exception.<DT><B>Throws:</B><DD><A HREF="../../../../javax/xml/transform/TransformerException.html">TransformerException</A> - only if
setThrowOnError is true.<DT><B>See Also: </B><DD><A HREF="../../../../javax/xml/transform/TransformerException.html"><CODE>TransformerException</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="logExceptionLocation(java.io.PrintWriter, java.lang.Throwable)"><!-- --></A><H3>
logExceptionLocation</H3>
<PRE>
public static void <B>logExceptionLocation</B>(java.io.PrintWriter&nbsp;pw,
java.lang.Throwable&nbsp;exception)</PRE>
<DL>
<DD>Print out location information about the exception.
Cribbed from DefaultErrorHandler.printLocation()<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pw</CODE> - PrintWriter to send output to<DD><CODE>exception</CODE> - TransformerException or SAXParseException
to log information about</DL>
</DD>
</DL>
<HR>
<A NAME="logSourceLine(java.io.PrintWriter, javax.xml.transform.SourceLocator)"><!-- --></A><H3>
logSourceLine</H3>
<PRE>
public static void <B>logSourceLine</B>(java.io.PrintWriter&nbsp;pw,
<A HREF="../../../../javax/xml/transform/SourceLocator.html">SourceLocator</A>&nbsp;locator)</PRE>
<DL>
<DD>Print out the specific source line that caused the exception,
if possible to load it.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pw</CODE> - PrintWriter to send output to<DD><CODE>locator</CODE> - Xalan wrapper for either a JAXP or a SAX
source location object</DL>
</DD>
</DL>
<HR>
<A NAME="setThrowOnWarning(boolean)"><!-- --></A><H3>
setThrowOnWarning</H3>
<PRE>
public void <B>setThrowOnWarning</B>(boolean&nbsp;b)</PRE>
<DL>
<DD>User-settable behavior: when to re-throw exceptions.
<p>This allows per-instance configuration of
ListingErrorHandlers. You can ask us to either throw
an exception when we're called for various warning /
error / fatalErrors, or simply log them and continue.</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - if we should throw an exception on warnings</DL>
</DD>
</DL>
<HR>
<A NAME="getThrowOnWarning()"><!-- --></A><H3>
getThrowOnWarning</H3>
<PRE>
public boolean <B>getThrowOnWarning</B>()</PRE>
<DL>
<DD>User-settable behavior: when to re-throw exceptions.<DD><DL>
<DT><B>Returns:</B><DD>if we throw an exception on warnings</DL>
</DD>
</DL>
<HR>
<A NAME="setThrowOnError(boolean)"><!-- --></A><H3>
setThrowOnError</H3>
<PRE>
public void <B>setThrowOnError</B>(boolean&nbsp;b)</PRE>
<DL>
<DD>User-settable behavior: when to re-throw exceptions.
<p>This allows per-instance configuration of
ListingErrorHandlers. You can ask us to either throw
an exception when we're called for various warning /
error / fatalErrors, or simply log them and continue.</p>
<p>Note that the behavior of many parsers/transformers
after an error is not necessarily defined!</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - if we should throw an exception on errors</DL>
</DD>
</DL>
<HR>
<A NAME="getThrowOnError()"><!-- --></A><H3>
getThrowOnError</H3>
<PRE>
public boolean <B>getThrowOnError</B>()</PRE>
<DL>
<DD>User-settable behavior: when to re-throw exceptions.<DD><DL>
<DT><B>Returns:</B><DD>if we throw an exception on errors</DL>
</DD>
</DL>
<HR>
<A NAME="setThrowOnFatalError(boolean)"><!-- --></A><H3>
setThrowOnFatalError</H3>
<PRE>
public void <B>setThrowOnFatalError</B>(boolean&nbsp;b)</PRE>
<DL>
<DD>User-settable behavior: when to re-throw exceptions.
<p>This allows per-instance configuration of
ListingErrorHandlers. You can ask us to either throw
an exception when we're called for various warning /
error / fatalErrors, or simply log them and continue.</p>
<p>Note that the behavior of many parsers/transformers
after a fatalError is not necessarily defined, most
products will probably barf if you continue.</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - if we should throw an exception on fatalErrors</DL>
</DD>
</DL>
<HR>
<A NAME="getThrowOnFatalError()"><!-- --></A><H3>
getThrowOnFatalError</H3>
<PRE>
public boolean <B>getThrowOnFatalError</B>()</PRE>
<DL>
<DD>User-settable behavior: when to re-throw exceptions.<DD><DL>
<DT><B>Returns:</B><DD>if we throw an exception on fatalErrors</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ListingErrorHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/xml/utils/IntVector.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/xml/utils/LocaleUtility.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="ListingErrorHandler.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
Copyright © 2006 Apache XML Project. All Rights Reserved.
</BODY>
</HTML>