mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 04:29:43 +00:00
better message on typeerror in scheduled function
This commit is contained in:
parent
83585f8d6a
commit
e81b2a0a1e
1 changed files with 2 additions and 1 deletions
|
|
@ -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{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue