better message on typeerror in scheduled function

This commit is contained in:
GameHerobrine 2024-08-18 17:21:56 +03:00
parent 83585f8d6a
commit e81b2a0a1e

View file

@ -645,7 +645,8 @@ class PocketMinecraftServer{
try{ try{
$return = @call_user_func($this->schedule[$cid][0] ?? function(){}, $this->schedule[$cid][1], $this->schedule[$cid][2]); //somehow args can be null $return = @call_user_func($this->schedule[$cid][0] ?? function(){}, $this->schedule[$cid][1], $this->schedule[$cid][2]); //somehow args can be null
}catch(TypeError $e){ }catch(TypeError $e){
ConsoleAPI::error($e->getTraceAsString()); $m = $e->getMessage()."\nStack trace:\n".$e->getTraceAsString();
ConsoleAPI::error($m);
$return = false; $return = false;
} }
}else{ }else{