mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-22 05:24:39 +00:00
Catch and log all crashes occurring while creating crashdumps
This commit is contained in:
parent
846be84324
commit
e0f8a02bb8
@ -2131,15 +2131,9 @@ class Server{
|
|||||||
$this->logger->emergency($this->getLanguage()->translateString("pocketmine.crash.create"));
|
$this->logger->emergency($this->getLanguage()->translateString("pocketmine.crash.create"));
|
||||||
try{
|
try{
|
||||||
$dump = new CrashDump($this);
|
$dump = new CrashDump($this);
|
||||||
}catch(\Throwable $e){
|
|
||||||
$this->logger->logException($e);
|
|
||||||
$this->logger->critical($this->getLanguage()->translateString("pocketmine.crash.error", [$e->getMessage()]));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->logger->emergency($this->getLanguage()->translateString("pocketmine.crash.submit", [$dump->getPath()]));
|
$this->logger->emergency($this->getLanguage()->translateString("pocketmine.crash.submit", [$dump->getPath()]));
|
||||||
|
|
||||||
|
|
||||||
if($this->getProperty("auto-report.enabled", true) !== false){
|
if($this->getProperty("auto-report.enabled", true) !== false){
|
||||||
$report = true;
|
$report = true;
|
||||||
$plugin = $dump->getData()["plugin"];
|
$plugin = $dump->getData()["plugin"];
|
||||||
@ -2170,6 +2164,11 @@ class Server{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}catch(\Throwable $e){
|
||||||
|
$this->logger->logException($e);
|
||||||
|
$this->logger->critical($this->getLanguage()->translateString("pocketmine.crash.error", [$e->getMessage()]));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//$this->checkMemory();
|
//$this->checkMemory();
|
||||||
//$dump .= "Memory Usage Tracking: \r\n" . chunk_split(base64_encode(gzdeflate(implode(";", $this->memoryStats), 9))) . "\r\n";
|
//$dump .= "Memory Usage Tracking: \r\n" . chunk_split(base64_encode(gzdeflate(implode(";", $this->memoryStats), 9))) . "\r\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user