cvs: pear /HTML_Progress2/examples/errorhandling errorstackcustom.php errorstackignore.php errorstacklogger.php

From: Date: Thu, 18 Aug 2005 12:05:31 +0000
Subject: cvs: pear /HTML_Progress2/examples/errorhandling errorstackcustom.php errorstackignore.php errorstacklogger.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-34103@lists.php.net to get a copy of this message
farell Thu Aug 18 08:05:31 2005 EDT Modified files: /pear/HTML_Progress2/examples/errorhandling errorstackcustom.php errorstackignore.php errorstacklogger.php Log: add ignore phpdoc tag to prevent includes into API docs http://cvs.php.net/diff.php/pear/HTML_Progress2/examples/errorhandling/errorstackcustom.php?r1=1.1&r2=1.2&ty=u Index: pear/HTML_Progress2/examples/errorhandling/errorstackcustom.php diff -u pear/HTML_Progress2/examples/errorhandling/errorstackcustom.php:1.1 pear/HTML_Progress2/examples/errorhandling/errorstackcustom.php:1.2 --- pear/HTML_Progress2/examples/errorhandling/errorstackcustom.php:1.1 Sun Jun 12 17:03:04 2005 +++ pear/HTML_Progress2/examples/errorhandling/errorstackcustom.php Thu Aug 18 08:05:28 2005 @@ -1,8 +1,8 @@ <?php /** * Customize error renderer with PEAR_ErrorStack. - * - * @version $Id: errorstackcustom.php,v 1.1 2005/06/12 21:03:04 farell Exp $ + * + * @version $Id: errorstackcustom.php,v 1.2 2005/08/18 12:05:28 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress2 * @subpackage Examples @@ -12,6 +12,9 @@ require_once 'HTML/Progress2/Error.php'; require_once 'PEAR/ErrorStack.php'; +/** + * @ignore + */ class HTML_Progress2_ErrorStack { function HTML_Progress2_ErrorStack() @@ -45,7 +48,7 @@ function log($err) { global $prefs; - + $lineFormat = '<b>%1$s:</b> %2$s<br/>[%3$s]<hr/>'."<br/>\n"; $contextFormat = 'in <b>%1$s</b> on line <b>%2$s</b>'; @@ -57,26 +60,26 @@ } $context = $err['context']; - + if ($context) { $file = $context['file']; $line = $context['line']; - + $contextExec = sprintf($contextFormat, $file, $line); } else { $contextExec = ''; } - - printf($lineFormat, - ucfirst(get_class($this)) . ' ' . $err['level'], - $err['message'], - $contextExec); + + printf($lineFormat, + ucfirst(get_class($this)) . ' ' . $err['level'], + $err['message'], + $contextExec); } function errorHandler($err) { global $halt_onException; - + if ($halt_onException) { if ($err['level'] == 'exception') { return PEAR_ERRORSTACK_DIE; @@ -119,6 +122,6 @@ // B2. Exception $pb2->setIndeterminate('true'); -print 'still alive !'; +print 'still alive !'; ?> \ No newline at end of file http://cvs.php.net/diff.php/pear/HTML_Progress2/examples/errorhandling/errorstackignore.php?r1=1.1&r2=1.2&ty=u Index: pear/HTML_Progress2/examples/errorhandling/errorstackignore.php diff -u pear/HTML_Progress2/examples/errorhandling/errorstackignore.php:1.1 pear/HTML_Progress2/examples/errorhandling/errorstackignore.php:1.2 --- pear/HTML_Progress2/examples/errorhandling/errorstackignore.php:1.1 Sun Jun 12 17:03:04 2005 +++ pear/HTML_Progress2/examples/errorhandling/errorstackignore.php Thu Aug 18 08:05:28 2005 @@ -1,9 +1,9 @@ <?php /** - * Simply ignores html_progress2 errors that occurs + * Simply ignores html_progress2 errors that occurs * with PEAR_ErrorStack handler. - * - * @version $Id: errorstackignore.php,v 1.1 2005/06/12 21:03:04 farell Exp $ + * + * @version $Id: errorstackignore.php,v 1.2 2005/08/18 12:05:28 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress2 * @subpackage Examples @@ -13,6 +13,9 @@ require_once 'HTML/Progress2/Error.php'; require_once 'PEAR/ErrorStack.php'; +/** + * @ignore + */ class HTML_Progress2_ErrorStack { function HTML_Progress2_ErrorStack() @@ -89,6 +92,6 @@ dump('PB2 html_progress2_errorstack ('.$i.')', $e); } -print 'still alive !'; +print 'still alive !'; ?> \ No newline at end of file http://cvs.php.net/diff.php/pear/HTML_Progress2/examples/errorhandling/errorstacklogger.php?r1=1.1&r2=1.2&ty=u Index: pear/HTML_Progress2/examples/errorhandling/errorstacklogger.php diff -u pear/HTML_Progress2/examples/errorhandling/errorstacklogger.php:1.1 pear/HTML_Progress2/examples/errorhandling/errorstacklogger.php:1.2 --- pear/HTML_Progress2/examples/errorhandling/errorstacklogger.php:1.1 Sun Jun 12 17:03:04 2005 +++ pear/HTML_Progress2/examples/errorhandling/errorstacklogger.php Thu Aug 18 08:05:29 2005 @@ -1,8 +1,8 @@ <?php /** * Customize error renderer with PEAR_ErrorStack and PEAR::Log. - * - * @version $Id: errorstacklogger.php,v 1.1 2005/06/12 21:03:04 farell Exp $ + * + * @version $Id: errorstacklogger.php,v 1.2 2005/08/18 12:05:29 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress2 * @subpackage Examples @@ -13,6 +13,9 @@ require_once 'PEAR/ErrorStack.php'; require_once 'Log.php'; +/** + * @ignore + */ class HTML_Progress2_ErrorStack { function HTML_Progress2_ErrorStack() @@ -22,7 +25,7 @@ $s->setErrorMessageTemplate($t); $s->setMessageCallback(array(&$this,'getMessage')); $s->setContextCallback(array(&$this,'getBacktrace')); - + $ident = $_SERVER['REMOTE_ADDR']; $conf = array('lineFormat' => '%1$s - %2$s [%3$s] %4$s'); $file = &Log::singleton('file', 'html_progress2_err.log', $ident, $conf); @@ -35,7 +38,7 @@ $composite = &Log::singleton('composite'); $composite->addChild($display); $composite->addChild($file); - + $s->setLogger($composite); $s->pushCallback(array(&$this,'errorHandler')); } @@ -47,13 +50,13 @@ } /** - * default ErrorStack message callback is + * default ErrorStack message callback is * PEAR_ErrorStack::getErrorMessage() */ function getMessage(&$stack, $err, $template = false) { - global $prefs; - + global $prefs; + $message = $stack->getErrorMessage($stack, $err, $template); $lineFormat = '%1$s %2$s [%3$s]'; @@ -69,17 +72,17 @@ } $context = $err['context']; - + if ($context) { $file = $context['file']; $line = $context['line']; - + $contextExec = sprintf($contextFormat, $file, $line); } else { $contextExec = ''; } - - $msg = sprintf($lineFormat, '', $message, $contextExec); + + $msg = sprintf($lineFormat, '', $message, $contextExec); return trim($msg); } @@ -97,7 +100,7 @@ function errorHandler($err) { global $halt_onException; - + if ($halt_onException) { if ($err['level'] == 'exception') { return PEAR_ERRORSTACK_DIE; @@ -154,6 +157,6 @@ // B2. Exception $pb2->setIndeterminate('true'); -print 'still alive !'; +print 'still alive !'; ?> \ No newline at end of file

« previous php.pear.cvs (#34103) next »