From: Reini U. <ru...@us...> - 2004-11-05 18:04:37
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21690 Modified Files: ErrorManager.php Log Message: print errno only if _DEBUG_VERBOSE Index: ErrorManager.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/ErrorManager.php,v retrieving revision 1.38 retrieving revision 1.39 diff -u -2 -b -p -d -r1.38 -r1.39 --- ErrorManager.php 19 Oct 2004 17:34:55 -0000 1.38 +++ ErrorManager.php 5 Nov 2004 18:04:20 -0000 1.39 @@ -451,9 +451,15 @@ class PhpError { $errfile = preg_replace('|^' . preg_quote($dir) . '|', '', $this->errfile); $lines = explode("\n", $this->errstr); - + if (DEBUG & _DEBUG_VERBOSE) { $msg = sprintf("%s:%d: %s[%d]: %s", $errfile, $this->errline, $this->getDescription(), $this->errno, array_shift($lines)); + } else { + $msg = sprintf("%s:%d: %s: \"%s\"", + $errfile, $this->errline, + $this->getDescription(), + array_shift($lines)); + } //$html = HTML::div(array('class' => $this->getHtmlClass()), HTML::p($msg)); @@ -572,7 +578,9 @@ class PhpErrorOnce extends PhpError { $errfile = preg_replace('|^' . preg_quote($dir) . '|', '', $this->errfile); $lines = explode("\n", $this->errstr); - $msg = sprintf("%s:%d: %s[%d]: %s %s", + $errtype = (DEBUG & _DEBUG_VERBOSE) ? sprintf("%s[%d]", $this->getDescription(), $this->errno) + : sprintf("%s", $this->getDescription()); + $msg = sprintf("%s:%d: %s: %s %s", $errfile, $this->errline, - $this->getDescription(), $this->errno, + $errtype, array_shift($lines), $count > 1 ? sprintf(" (...repeated %d times)",$count) : "" @@ -598,4 +606,7 @@ if (!isset($GLOBALS['ErrorManager'])) { // $Log$ +// Revision 1.39 2004/11/05 18:04:20 rurban +// print errno only if _DEBUG_VERBOSE +// // Revision 1.38 2004/10/19 17:34:55 rurban // <4.3 fix |