Download Summary
Transcript
Debugging
// skip the method where we turned an error into an
Exception
if ($aTrace['function'] != 'errorHandler') {
// init output for this trace
$output = array();
$output[] = "Backtrace step $count:";
// output class if given
if (array_key_exists('class', $aTrace)) {
$output[] = array('Class: ', $aTrace['class']);
}
// output type if given
if (array_key_exists('type', $aTrace)) {
$output[] = array('Type: ', $aTrace['type']);
}
// output function if given
if (array_key_exists('function', $aTrace)) {
$output[] = array('Function: ',
$aTrace['function']);
// output argument to function
if (array_key_exists('args', $aTrace)) {
$output[] = array('', 'with argument(s): ' .
implode(', ', $aTrace['args']));
}
}
// get source code of file that threw exception
$sourceExcerpt =
self::getSourceExcerpt($aTrace['file'], $aTrace['line']);
$output[] = 'Source code excerpt of lines ' .
$sourceExcerpt['start']
. ' through ' . $sourceExcerpt['end'] . '
of file ' . $aTrace['file'] . ':';
// highlight syntax for HTML output
if (self::$outputFormat == self::HTML) {
$output[] = array('', highlight_string(implode('',
[ 220 ]
Download from Wow! eBook
www.WoweBook.com
Related documents
Nortel Networks V210 User's Manual
詳細データ
Nortel Networks V100 User's Manual
1 - Kozio
An Experimental Implementation of Equivalence Reasoning in the
pdf version - ShnfuCarver 1.0 documentation
Part I Getting Started with Arduino
Pragmatic Guide to Git
Zend Enterprise PHP Patterns
The iPad 2 Project Book: Stuff you can do with your iPad
O`Reilly - iPhone Game Development (2009)_www.megasoftz.com
File - Information Systems Department
Introduction to Git for Drupal
User Guide Zend Studio 7.x