refac: 에러 핸들링 방식 변경, FatalError 대응
This commit is contained in:
@@ -363,7 +363,7 @@ function setGeneralCommand(int $generalID, array $rawTurnList, string $command,
|
||||
'target'=>'arg'
|
||||
];
|
||||
}
|
||||
catch (\Exception $e){
|
||||
catch (\Throwable $e){
|
||||
return [
|
||||
'result'=>false,
|
||||
'reason'=>$e->getCode().$e->getMessage(),
|
||||
@@ -445,7 +445,7 @@ function setNationCommand(int $generalID, array $turnList, string $command, ?arr
|
||||
'target'=>'arg'
|
||||
];
|
||||
}
|
||||
catch (\Exception $e){
|
||||
catch (\Throwable $e){
|
||||
return [
|
||||
'result'=>false,
|
||||
'reason'=>$e->getCode().$e->getMessage(),
|
||||
|
||||
@@ -38,7 +38,7 @@ if(count($lastMsgGet) >= 10){
|
||||
}
|
||||
array_shift($lastMsgGet);
|
||||
}
|
||||
catch(\Exception $e){
|
||||
catch(\Throwable $e){
|
||||
$lastMsgGet = [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ if(count($lastMsgGet) >= 10){
|
||||
}
|
||||
array_shift($lastMsgGet);
|
||||
}
|
||||
catch(\Exception $e){
|
||||
catch(\Throwable $e){
|
||||
$lastMsgGet = [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ if($eventArgsJson !== null){
|
||||
$eventArgs[] = $eventNextArgs;
|
||||
}
|
||||
}
|
||||
catch(\Exception $e){
|
||||
catch(\Throwable $e){
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'arg가 올바른 json이 아닙니다'
|
||||
|
||||
@@ -23,7 +23,7 @@ class FinishNationBetting extends \sammo\Event\Action
|
||||
|
||||
try {
|
||||
$bettingHelper = new Betting($this->bettingID);
|
||||
} catch (\Exception $e) {
|
||||
} catch (\Throwable $e) {
|
||||
return [__CLASS__, false, $e->getMessage()];
|
||||
}
|
||||
|
||||
|
||||
@@ -392,7 +392,7 @@ class Scenario{
|
||||
$text = \file_get_contents(ServConfig::getSharedIconPath('../hook/list.json?1'));
|
||||
$storedIcons = Json::decode($text);
|
||||
}
|
||||
catch(\Exception $e){
|
||||
catch(\Throwable $e){
|
||||
$storedIcons = [];
|
||||
}
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ class GeneralBuilder{
|
||||
$this->specialDomestic = SpecialityHelper::getDomesticClassByName($special);
|
||||
$this->specialWar = GameConst::$defaultSpecialWar;
|
||||
}
|
||||
catch (\Exception $e){
|
||||
catch (\Throwable $e){
|
||||
$this->specialDomestic = GameConst::$defaultSpecialDomestic;
|
||||
$this->specialWar = SpecialityHelper::getWarClassByName($special);
|
||||
}
|
||||
@@ -540,7 +540,7 @@ class GeneralBuilder{
|
||||
$text = \file_get_contents(\sammo\ServConfig::getSharedIconPath('../hook/list.json?1'));
|
||||
$storedIcons = \sammo\Json::decode($text);
|
||||
}
|
||||
catch(\Exception $e){
|
||||
catch(\Throwable $e){
|
||||
$storedIcons = [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user