Revision: 334
Updated Code
at July 10, 2006 02:19 by hiro
Updated Code
/**
* 開発時ã«ã¤ã‹ã†ã‚¨ãƒ©ãƒ¼ãƒãƒ³ãƒ‰ãƒ©
*
* E_USER_ERROR プãƒã‚°ãƒ©ãƒ を終了ã™ã‚‹ã‚ˆã†ãªã‚¨ãƒ©ãƒ¼(DB接続ä¸èƒ½ãªã©)
* E_USER_WARNING 想定外ã®å‹•作ã®è¦å‘Š(æ„図ã—ãªã„変数ã®ä¸Šæ›¸ããªã©)
* E_USER_NOTICE エラーã§ã¯ãªã„ãŒã€æƒ³å®šã—ãŸå‹•作をã—ã¦ã„ã‚‹ã‹ç¢ºèªã§ãã‚‹ãŸã‚ã®ãƒ‡ãƒãƒƒã‚°æƒ…å ±
*
* @return void
* @param PHP ã® set_error_handler() 関数ã®ãƒžãƒ‹ãƒ¥ã‚¢ãƒ«å‚ç…§
*/
function handle_error($err_no, $err_str, $err_file, $err_line)
{
global $config;
if(preg_match('/' . $config['log_filter_ignore'] . '/', $err_str)) {
return;
}
$bc = debug_backtrace();
array_shift($bc);
// ãƒãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’表示
$str = "<table>";
foreach($bc as $b) {
if(isset($b['args'][0])) {
$mess = $b['args'][0];
} else {
$mess = '';
}
if(preg_match('/validate/', $b['function'])) {
continue;
}
$str .= "<tr>";
$str .= "<td>" . $b['file'] . '(' . $b['line'] . ') </td><td>' . $b['function'] . '</td><td>' . $mess . '</td>';
$str .= "</tr>";
}
$str .= "</table>";
print $str;
}
Revision: 333
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at July 10, 2006 02:17 by hiro
Initial Code
/**
* 開発時ã«ã¤ã‹ã†ã‚¨ãƒ©ãƒ¼ãƒãƒ³ãƒ‰ãƒ©
*
* E_USER_ERROR プãƒã‚°ãƒ©ãƒ を終了ã™ã‚‹ã‚ˆã†ãªã‚¨ãƒ©ãƒ¼(DB接続ä¸èƒ½ãªã©)
* E_USER_WARNING 想定外ã®å‹•作ã®è¦å‘Š(æ„図ã—ãªã„変数ã®ä¸Šæ›¸ããªã©)
* E_USER_NOTICE エラーã§ã¯ãªã„ãŒã€æƒ³å®šã—ãŸå‹•作をã—ã¦ã„ã‚‹ã‹ç¢ºèªã§ãã‚‹ãŸã‚ã®ãƒ‡ãƒãƒƒã‚°æƒ…å ±
*
* @return void
* @param PHP ã® set_error_handler() 関数ã®ãƒžãƒ‹ãƒ¥ã‚¢ãƒ«å‚ç…§
*/
function handle_error($err_no, $err_str, $err_file, $err_line)
{
global $config;
if(preg_match('/' . $config['log_filter_ignore'] . '/', $err_str)) {
return;
}
$bc = debug_backtrace();
array_shift($bc);
// ãƒãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’表示
$str = "<table>";
foreach($bc as $b) {
if(isset($b['args'][0])) {
$mess = $b['args'][0];
} else {
$mess = '';
}
if(preg_match('/validate/', $b['function'])) {
continue;
}
$str .= "<tr>";
$str .= "<td>" . $b['file'] . '(' . $b['line'] . ') </td><td>' . $b['function'] . '</td><td>' . $mess . '</td>';
$str .= "</tr>";
}
$str .= "</table>";
var_dump($str);
//$str = "[" . $err_no . "]" . $err_str . "\r\n file:" . $err_file . "(" . $err_line . ")";
//print $str;
print $str;
//var_dump($err_no, $err_str, $err_file, $err_line);
}
Initial URL
Initial Description
é©å½“エラーãƒãƒ³ãƒ‰ãƒ©
Initial Title
エラーãƒãƒ³ãƒ‰ãƒ©
Initial Tags
Initial Language
PHP