fix: set_error_handler를 못잡는 문제 해결

기타 소소한 버그
- 피장파장 입력시 warning을 계속 일으키는 버그(동작 문제는 없음)
- 토너먼트에서 승리,패배,무승부 외에 MustNotBeReachedException이 throw되지 않음(동작 문제는 없음)
This commit is contained in:
2021-10-12 01:43:54 +09:00
parent 43ec361d03
commit d672ce4d80
3 changed files with 20 additions and 17 deletions
+16 -16
View File
@@ -15,35 +15,35 @@ ini_set("session.gc_maxlifetime", '604800'); // seconds
function getFriendlyErrorType($type)
{
switch ($type) {
case E_ERROR: // 1 //
case E_ERROR: // 1 //
return 'E_ERROR';
case E_WARNING: // 2 //
case E_WARNING: // 2 //
return 'E_WARNING';
case E_PARSE: // 4 //
case E_PARSE: // 4 //
return 'E_PARSE';
case E_NOTICE: // 8 //
case E_NOTICE: // 8 //
return 'E_NOTICE';
case E_CORE_ERROR: // 16 //
case E_CORE_ERROR: // 16 //
return 'E_CORE_ERROR';
case E_CORE_WARNING: // 32 //
case E_CORE_WARNING: // 32 //
return 'E_CORE_WARNING';
case E_COMPILE_ERROR: // 64 //
case E_COMPILE_ERROR: // 64 //
return 'E_COMPILE_ERROR';
case E_COMPILE_WARNING: // 128 //
case E_COMPILE_WARNING: // 128 //
return 'E_COMPILE_WARNING';
case E_USER_ERROR: // 256 //
case E_USER_ERROR: // 256 //
return 'E_USER_ERROR';
case E_USER_WARNING: // 512 //
case E_USER_WARNING: // 512 //
return 'E_USER_WARNING';
case E_USER_NOTICE: // 1024 //
case E_USER_NOTICE: // 1024 //
return 'E_USER_NOTICE';
case E_STRICT: // 2048 //
case E_STRICT: // 2048 //
return 'E_STRICT';
case E_RECOVERABLE_ERROR: // 4096 //
case E_RECOVERABLE_ERROR: // 4096 //
return 'E_RECOVERABLE_ERROR';
case E_DEPRECATED: // 8192 //
case E_DEPRECATED: // 8192 //
return 'E_DEPRECATED';
case E_USER_DEPRECATED: // 16384 //
case E_USER_DEPRECATED: // 16384 //
return 'E_USER_DEPRECATED';
}
return "{$type}";
@@ -134,7 +134,7 @@ function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, in
getExceptionTraceAsString($e)
);
}
set_error_handler("\sammo\logErrorByCustomHandler");
set_error_handler("\\sammo\\logErrorByCustomHandler");
function logExceptionByCustomHandler(\Throwable $e)
+1 -1
View File
@@ -1132,7 +1132,7 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
$gen1resKey = 'd';
$gen2resKey = 'd';
break;
default: new MustNotBeReachedException();
default: throw new MustNotBeReachedException();
}
$db->update('rank_data', [
@@ -33,6 +33,9 @@ class che_피장파장 extends Command\NationCommand{
if(!key_exists('destNationID', $this->arg)){
return false;
}
if(!key_exists('commandType', $this->arg)){
return false;
}
$destNationID = $this->arg['destNationID'];
$commandType = $this->arg['commandType'];