diff options
author | xue <> | 2006-08-28 02:49:48 +0000 |
---|---|---|
committer | xue <> | 2006-08-28 02:49:48 +0000 |
commit | 546b2e8e6bcb87b32c43b683a2f3c767632d8e18 (patch) | |
tree | 0819d502e839a43e91e7094ce3d232f9f9abccd9 | |
parent | 5a55bca3e31f4cefa2b3fa6e854431db91528837 (diff) |
Prado::fatalError() now displays function parameter information
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | framework/PradoBase.php | 36 |
2 files changed, 32 insertions, 5 deletions
@@ -7,6 +7,7 @@ ENH: TListControl.SelectedValues and SelectedIndices can now be set before datab ENH: Upgrade Scriptaculous javascript library to 1.6.2 (Wei) ENH: Cells in TDataGrid rows can now be accessed via the corresponding column IDs (Qiang) ENH: Input controls in some datagrid columns can now be accessed in a named fashion (Qiang) +ENH: Prado::fatalError() now displays function parameter information (Qiang) CHG: Unify all client-side javascript event handler syntax. (Wei) CHG: Added more conditions in the requirement checker (Qiang) CHG: TControl::findControlsByType() now only returns objects of the specified type (Qiang) diff --git a/framework/PradoBase.php b/framework/PradoBase.php index 30b98f53..cf1d67fb 100644 --- a/framework/PradoBase.php +++ b/framework/PradoBase.php @@ -389,12 +389,38 @@ class PradoBase echo ' -- ';
if(isset($t['class']))
echo $t['class'] . $t['type'];
- echo $t['function'];
+ echo $t['function'] . '(';
if(isset($t['args']) && sizeof($t['args']) > 0)
- echo '(...)';
- else
- echo '()';
- echo "\n";
+ {
+ $count=0;
+ foreach($t['args'] as $item)
+ {
+ if(is_string($item))
+ {
+ $str=htmlentities(str_replace("\r\n", "", $item), ENT_QUOTES);
+ if (strlen($item) > 70)
+ echo "'". substr($str, 0, 70) . "...'";
+ else
+ echo "'" . $str . "'";
+ }
+ else if (is_int($item) || is_float($item))
+ echo $item;
+ else if (is_object($item))
+ echo get_class($item);
+ else if (is_array($item))
+ echo 'array(' . count($item) . ')';
+ else if (is_bool($item))
+ echo $item ? 'true' : 'false';
+ else if (is_null($item))
+ echo 'NULL';
+ else if (is_resource($item))
+ echo get_resource_type($item);
+ $count++;
+ if (count($t['args']) > $count)
+ echo ', ';
+ }
+ }
+ echo ")\n";
}
echo '</pre>';
exit(1);
|