mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-03 09:14:48 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@126 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ee2a89b7ce
commit
e7d5dd84e8
27 changed files with 395 additions and 279 deletions
|
|
@ -19,7 +19,16 @@
|
|||
* @brief debug mode = true 일때 files/_debug_message.php 에 디버그 내용이 쌓임
|
||||
**/
|
||||
define('__DEBUG__', true);
|
||||
if(__DEBUG__) define('__StartTime__', getMicroTime());
|
||||
if(__DEBUG__) {
|
||||
|
||||
// php5이상이면 error handling을 handleError() 로 set
|
||||
if (version_compare(phpversion(), '5.0') > 0) {
|
||||
set_error_handler("handleError");
|
||||
}
|
||||
|
||||
// 여기서부터 시작 시간으로 설정
|
||||
define('__StartTime__', getMicroTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 세션 설정
|
||||
|
|
|
|||
|
|
@ -142,4 +142,22 @@
|
|||
|
||||
return $var;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief php5 이상에서 error_handing을 debugPrint로 변경
|
||||
* @param errno
|
||||
* @param errstr
|
||||
* @return file
|
||||
* @return line
|
||||
**/
|
||||
function handleError($errno, $errstr, $file, $line) {
|
||||
if(!__DEBUG__) return;
|
||||
$errors = array(E_USER_ERROR, E_ERROR, E_PARSE);
|
||||
if(!in_array($errno,$errors)) return;
|
||||
|
||||
$output = sprintf("Fatal error : %s - %d", $file, $line);
|
||||
$output .= sprintf("%d - %s", $errno, $errstr);
|
||||
|
||||
debugPrint($output);
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue