Sophie

Sophie

distrib > Fedora > 16 > x86_64 > by-pkgid > ef445f0ce4be1c28e0c51502e9156d24 > files > 603

log4cxx-devel-0.10.0-10.fc15.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Apache log4cxx: ErrorHandler Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Apache log4cxx&#160;<span id="projectnumber">Version 0.10.0</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('classlog4cxx_1_1spi_1_1_error_handler.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<h1>ErrorHandler Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="log4cxx::spi::ErrorHandler" --><!-- doxytag: inherits="log4cxx::spi::OptionHandler" -->
<p>Appenders may delegate their error handling to <code>ErrorHandlers</code>.  
<a href="#_details">More...</a></p>

<p>Inherits <a class="el" href="classlog4cxx_1_1spi_1_1_option_handler.html">log4cxx::spi::OptionHandler</a>.</p>

<p>Inherited by <a class="el" href="classlog4cxx_1_1helpers_1_1_only_once_error_handler.html">OnlyOnceErrorHandler</a><code> [virtual]</code>, and <a class="el" href="classlog4cxx_1_1varia_1_1_fallback_error_handler.html">FallbackErrorHandler</a><code> [virtual]</code>.</p>

<p><a href="classlog4cxx_1_1spi_1_1_error_handler-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1spi_1_1_error_handler.html#a70e018e3f27ead8d955acd70e0e11737">~ErrorHandler</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1spi_1_1_error_handler.html#a657c680e0246d95168aecbe4d299822b">setLogger</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">LoggerPtr</a> &amp;logger)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a reference to a logger to which the failing appender might be attached to.  <a href="#a657c680e0246d95168aecbe4d299822b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1spi_1_1_error_handler.html#a20b213d025014be558dfab7e11652825">error</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;message, const std::exception &amp;e, int errorCode) const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to the error(const String&amp;, <a class="el" href="classlog4cxx_1_1helpers_1_1_exception.html" title="The class Exception and its subclasses indicate conditions that a reasonable application might want t...">helpers::Exception</a>&amp;, int, <a class="el" href="classlog4cxx_1_1spi_1_1_logging_event.html" title="The internal representation of logging events.">spi::LoggingEvent</a>&amp;) with the the event parameteter set to null.  <a href="#a20b213d025014be558dfab7e11652825"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1spi_1_1_error_handler.html#a390324c11808d0cd4fee6c3967932f27">error</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;message) const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This method is normally used to just print the error message passed as a parameter.  <a href="#a390324c11808d0cd4fee6c3967932f27"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1spi_1_1_error_handler.html#ab087032b921fcef1735256049d38f0c1">error</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;message, const std::exception &amp;e, int errorCode, const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">LoggingEventPtr</a> &amp;event) const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This method is invoked to handle the error.  <a href="#ab087032b921fcef1735256049d38f0c1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1spi_1_1_error_handler.html#abf38035eedf752b85b9ffdcf414edd64">setAppender</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">AppenderPtr</a> &amp;appender)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the appender for which errors are handled.  <a href="#abf38035eedf752b85b9ffdcf414edd64"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1spi_1_1_error_handler.html#abc2bb91894f25f42d8e1a429c8bec2bc">setBackupAppender</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">AppenderPtr</a> &amp;appender)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the appender to fallback upon in case of failure.  <a href="#abc2bb91894f25f42d8e1a429c8bec2bc"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Appenders may delegate their error handling to <code>ErrorHandlers</code>. </p>
<p>Error handling is a particularly tedious to get right because by definition errors are hard to predict and to reproduce.</p>
<p>Please take the time to contact the author in case you discover that errors are not properly handled. You are most welcome to suggest new error handling policies or criticize existing policies. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a70e018e3f27ead8d955acd70e0e11737"></a><!-- doxytag: member="log4cxx::spi::ErrorHandler::~ErrorHandler" ref="a70e018e3f27ead8d955acd70e0e11737" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ~<a class="el" href="classlog4cxx_1_1spi_1_1_error_handler.html">ErrorHandler</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a20b213d025014be558dfab7e11652825"></a><!-- doxytag: member="log4cxx::spi::ErrorHandler::error" ref="a20b213d025014be558dfab7e11652825" args="(const LogString &amp;message, const std::exception &amp;e, int errorCode) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void error </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&#160;</td>
          <td class="paramname"><em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::exception &amp;&#160;</td>
          <td class="paramname"><em>e</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>errorCode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Equivalent to the error(const String&amp;, <a class="el" href="classlog4cxx_1_1helpers_1_1_exception.html" title="The class Exception and its subclasses indicate conditions that a reasonable application might want t...">helpers::Exception</a>&amp;, int, <a class="el" href="classlog4cxx_1_1spi_1_1_logging_event.html" title="The internal representation of logging events.">spi::LoggingEvent</a>&amp;) with the the event parameteter set to null. </p>

<p>Implemented in <a class="el" href="classlog4cxx_1_1helpers_1_1_only_once_error_handler.html#a9084c6c8c225845ed09867b730590514">OnlyOnceErrorHandler</a>, and <a class="el" href="classlog4cxx_1_1varia_1_1_fallback_error_handler.html#a9084c6c8c225845ed09867b730590514">FallbackErrorHandler</a>.</p>

</div>
</div>
<a class="anchor" id="ab087032b921fcef1735256049d38f0c1"></a><!-- doxytag: member="log4cxx::spi::ErrorHandler::error" ref="ab087032b921fcef1735256049d38f0c1" args="(const LogString &amp;message, const std::exception &amp;e, int errorCode, const LoggingEventPtr &amp;event) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void error </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&#160;</td>
          <td class="paramname"><em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::exception &amp;&#160;</td>
          <td class="paramname"><em>e</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>errorCode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">LoggingEventPtr</a> &amp;&#160;</td>
          <td class="paramname"><em>event</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This method is invoked to handle the error. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">message</td><td>The message assoicated with the error. </td></tr>
    <tr><td class="paramname">e</td><td>The Exption that was thrown when the error occured. </td></tr>
    <tr><td class="paramname">errorCode</td><td>The error code associated with the error. </td></tr>
    <tr><td class="paramname">event</td><td>The logging event that the failing appender is asked to log. </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classlog4cxx_1_1helpers_1_1_only_once_error_handler.html#a24071234bd8fa94ccab51c6ac5e246c5">OnlyOnceErrorHandler</a>, and <a class="el" href="classlog4cxx_1_1varia_1_1_fallback_error_handler.html#a24071234bd8fa94ccab51c6ac5e246c5">FallbackErrorHandler</a>.</p>

</div>
</div>
<a class="anchor" id="a390324c11808d0cd4fee6c3967932f27"></a><!-- doxytag: member="log4cxx::spi::ErrorHandler::error" ref="a390324c11808d0cd4fee6c3967932f27" args="(const LogString &amp;message) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void error </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&#160;</td>
          <td class="paramname"><em>message</em></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This method is normally used to just print the error message passed as a parameter. </p>

<p>Implemented in <a class="el" href="classlog4cxx_1_1helpers_1_1_only_once_error_handler.html#ad92a3ce84facc670863be59563d0603d">OnlyOnceErrorHandler</a>, and <a class="el" href="classlog4cxx_1_1varia_1_1_fallback_error_handler.html#a40069b80e5ee8953b25177cc3574aa4b">FallbackErrorHandler</a>.</p>

</div>
</div>
<a class="anchor" id="abf38035eedf752b85b9ffdcf414edd64"></a><!-- doxytag: member="log4cxx::spi::ErrorHandler::setAppender" ref="abf38035eedf752b85b9ffdcf414edd64" args="(const AppenderPtr &amp;appender)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void setAppender </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">AppenderPtr</a> &amp;&#160;</td>
          <td class="paramname"><em>appender</em></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the appender for which errors are handled. </p>
<p>This method is usually called when the error handler is configured. </p>

<p>Implemented in <a class="el" href="classlog4cxx_1_1helpers_1_1_only_once_error_handler.html#a5d46275bd2a01b2102f4b03b294ec50b">OnlyOnceErrorHandler</a>, and <a class="el" href="classlog4cxx_1_1varia_1_1_fallback_error_handler.html#a5e3545411b1bb167ca7c30d554cb7252">FallbackErrorHandler</a>.</p>

</div>
</div>
<a class="anchor" id="abc2bb91894f25f42d8e1a429c8bec2bc"></a><!-- doxytag: member="log4cxx::spi::ErrorHandler::setBackupAppender" ref="abc2bb91894f25f42d8e1a429c8bec2bc" args="(const AppenderPtr &amp;appender)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void setBackupAppender </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">AppenderPtr</a> &amp;&#160;</td>
          <td class="paramname"><em>appender</em></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the appender to fallback upon in case of failure. </p>

<p>Implemented in <a class="el" href="classlog4cxx_1_1helpers_1_1_only_once_error_handler.html#af5ce3a0cde4a80c96cf5dee6389550b5">OnlyOnceErrorHandler</a>, and <a class="el" href="classlog4cxx_1_1varia_1_1_fallback_error_handler.html#a953bb1714ea396c901a07bbdf6a9e923">FallbackErrorHandler</a>.</p>

</div>
</div>
<a class="anchor" id="a657c680e0246d95168aecbe4d299822b"></a><!-- doxytag: member="log4cxx::spi::ErrorHandler::setLogger" ref="a657c680e0246d95168aecbe4d299822b" args="(const LoggerPtr &amp;logger)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void setLogger </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">LoggerPtr</a> &amp;&#160;</td>
          <td class="paramname"><em>logger</em></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add a reference to a logger to which the failing appender might be attached to. </p>
<p>The failing appender will be searched and replaced only in the loggers you add through this method.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">logger</td><td>One of the loggers that will be searched for the failing appender in view of replacement. </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classlog4cxx_1_1helpers_1_1_only_once_error_handler.html#ad71cb681f580c2dd0ac0b15c4c5cf979">OnlyOnceErrorHandler</a>, and <a class="el" href="classlog4cxx_1_1varia_1_1_fallback_error_handler.html#ad71cb681f580c2dd0ac0b15c4c5cf979">FallbackErrorHandler</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="errorhandler_8h.html">errorhandler.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespacelog4cxx.html">log4cxx</a>      </li>
      <li class="navelem"><a class="el" href="namespacelog4cxx_1_1spi.html">spi</a>      </li>
      <li class="navelem"><a class="el" href="classlog4cxx_1_1spi_1_1_error_handler.html">ErrorHandler</a>      </li>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements.  See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
    </BODY>
</HTML>