alex Wed Aug 22 10:50:52 2001 EDT
Modified files:
/r2/binarycloud/base/core Debug.php
Log:
Charlie's Additions.
Index: r2/binarycloud/base/core/Debug.php
diff -u r2/binarycloud/base/core/Debug.php:1.6 r2/binarycloud/base/core/Debug.php:1.7
--- r2/binarycloud/base/core/Debug.php:1.6 Wed Aug 1 15:49:50 2001
+++ r2/binarycloud/base/core/Debug.php Wed Aug 22 10:50:52 2001
@@ -1,15 +1,14 @@
<?php
-// Header {{{
-/*******************************************************************************
- ** -File $Id: Debug.php,v 1.6 2001/08/01 22:49:50 alex Exp $
- ** -License LGPL (http://www.gnu.org/copyleft/lesser.html)
- ** -Copyright 2001, The Turing Studio, Inc.
- ** -Author alex black, en...@tu...
- ******************************************************************************/
+// {{{ Header
+/* -File $Id: Debug.php,v 1.7 2001/08/22 17:50:52 alex Exp $
+ * -License LGPL (http://www.gnu.org/copyleft/lesser.html)
+ * -Copyright 2001, The Turing Studio, Inc.
+ * -Author alex black, en...@tu...
+ */
+// }}}
$PACKAGE='binarycloud.core';
-// }}}
// {{{ Debug
/**
@@ -80,8 +79,9 @@
* @access public
*/
- function CaptureError($error) {
+ function CaptureError($label, $error='') {
if (BC_FLAG_DEBUG == true) {
+ $this->errors[] = $label;
$this->errors[] = $error;
return true;
} else {
@@ -227,6 +227,7 @@
$this->_output_vars();
$this->_output_server_env();
$this->_output_globals();
+ $this->_output_included_files();
break;
case "script_time":
$this->_output_script_time();
@@ -264,6 +265,9 @@
case "globals":
$this->_output_globals();
break;
+ case "included_files":
+ $this->_output_included_files();
+ break;
default:
$this->_output_script_time();
$this->_output_auth_info();
@@ -277,6 +281,7 @@
$this->_output_vars();
$this->_output_server_env();
$this->_output_globals();
+ $this->_output_included_files();
break;
}
@@ -653,16 +658,38 @@
// {{{ _output_errors
/**
- * Ditto _output_auth_info, but for Perm.
+ * Ditto _output_messages, but for Errors.
*
* @author alex black, en...@tu...
* @access private
*/
function _output_errors() {
+
$this->_output_header('Errors');
- }
+ if (is_array($this->errors)) {
+ $i = 0;
+ foreach ($this->errors as $key) {
+ if ($i == "0") {
+ $i++;
+ echo $key;
+ echo ": ";
+ } else {
+ if (is_array($key)) {
+ print_r($key);
+ } else {
+ echo $key;
+ }
+ echo "\n";
+ $i = 0;
+ }
+ }
+ } else {
+ echo "No errors have been captured";
+ }
+ }
+
// }}}
// {{{ _output_queries
@@ -697,6 +724,28 @@
}
// }}}
+ // {{{ _output_included_files
+ /**
+ * This method prints all of the included/required files.
+ *
+ * @author charles killian, ch...@al...
+ * @access private
+ */
+
+ function _output_included_files() {
+ $this->_output_header('Included files');
+ $included_files = get_included_files();
+ if (count($included_files) > 0) {
+ foreach ($included_files as $key) {
+ print_r($key);
+ echo "\n";
+ }
+ } else {
+ echo "No files have been included";
+ }
+ }
+
+ // }}}
// {{{ _output_header
/**
@@ -730,6 +779,7 @@
}
// }}}
+
}
// }}}
|