public function __construct(Server $server) { $this->time = time(); $this->server = $server; $this->path = $this->server->getCrashPath() . "CrashDump_" . date("D_M_j-H.i.s-T_Y", $this->time) . ".log"; $this->fp = @fopen($this->path, "wb"); if (!is_resource($this->fp)) { throw new RuntimeException("Could not create Crash Dump"); } $this->data["time"] = $this->time; $this->addLine($this->server->getName() . " Crash Dump " . date("D M j H:i:s T Y", $this->time)); $this->addLine(); $this->baseCrash(); $this->generalData(); $this->pluginsData(); $this->extraData(); //$this->encodeData(); }
public function __construct(Server $server) { $this->time = time(); $this->server = $server; $this->path = $this->server->getCrashPath() . "CrashDump_" . date("D_M_j-H.i.s-T_Y", $this->time) . ".log"; $this->fp = @fopen($this->path, "wb"); if (!is_resource($this->fp)) { throw new \RuntimeException("Could not create Crash Dump"); } $this->data["time"] = $this->time; $this->addLine($this->server->getName() . " Crash Dump " . date("D M j H:i:s T Y", $this->time)); $this->addLine(); try { $this->baseCrash(); } catch (\Exception $e) { //Attempt to fix incomplete crashdumps $this->addLine("CrashDump crashed while generating base crash data"); $this->addLine(); } $this->generalData(); $this->pluginsData(); $this->extraData(); //$this->encodeData(); }