cought fatal exception
This commit is contained in:
parent
98b146f51d
commit
5dcc8e865c
@ -225,14 +225,14 @@ class ManiaControl implements CommandListener, TimerListener {
|
|||||||
// Announce quit
|
// Announce quit
|
||||||
$this->chat->sendInformation('ManiaControl shutting down.');
|
$this->chat->sendInformation('ManiaControl shutting down.');
|
||||||
|
|
||||||
if($this->client){
|
if ($this->client) {
|
||||||
try{
|
try {
|
||||||
// Hide manialinks
|
// Hide manialinks
|
||||||
$this->client->sendHideManialinkPage();
|
$this->client->sendHideManialinkPage();
|
||||||
// Close the client connection
|
// Close the client connection
|
||||||
$this->client->delete($this->server->ip, $this->server->port);
|
$this->client->delete($this->server->ip, $this->server->port);
|
||||||
} catch(FatalException $e){
|
} catch(FatalException $e) {
|
||||||
$this->errorHandler->triggerDebugNotice($e->getMessage() ." File: " . $e->getFile() . " Line: " . $e->getLine());
|
$this->errorHandler->triggerDebugNotice($e->getMessage() . " File: " . $e->getFile() . " Line: " . $e->getLine());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -326,8 +326,8 @@ class ManiaControl implements CommandListener, TimerListener {
|
|||||||
|
|
||||||
} catch(FatalException $e) {
|
} catch(FatalException $e) {
|
||||||
//TODO remove
|
//TODO remove
|
||||||
if($this->errorHandler){
|
if ($this->errorHandler) {
|
||||||
$this->errorHandler->triggerDebugNotice("Fatal Exception: " . $e->getMessage() . " tracestring " . $e->getTraceAsString());
|
$this->errorHandler->triggerDebugNotice("Fatal Exception: " . $e->getMessage() . " Trace: " . $e->getTraceAsString());
|
||||||
}
|
}
|
||||||
$this->quit($e->getMessage());
|
$this->quit($e->getMessage());
|
||||||
}
|
}
|
||||||
@ -394,9 +394,17 @@ class ManiaControl implements CommandListener, TimerListener {
|
|||||||
$this->client->enableCallbacks(true);
|
$this->client->enableCallbacks(true);
|
||||||
|
|
||||||
// Wait for server to be ready
|
// Wait for server to be ready
|
||||||
|
try {
|
||||||
if (!$this->server->waitForStatus(4)) {
|
if (!$this->server->waitForStatus(4)) {
|
||||||
trigger_error("Server couldn't get ready!", E_USER_ERROR);
|
trigger_error("Server couldn't get ready!", E_USER_ERROR);
|
||||||
}
|
}
|
||||||
|
} catch(FatalException $e) {
|
||||||
|
//TODO remove
|
||||||
|
if ($this->errorHandler) {
|
||||||
|
$this->errorHandler->triggerDebugNotice("Fatal Exception: " . $e->getMessage() . " Trace: " . $e->getTraceAsString());
|
||||||
|
}
|
||||||
|
$this->quit($e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
// Connect finished
|
// Connect finished
|
||||||
$this->log("Server Connection successfully established!");
|
$this->log("Server Connection successfully established!");
|
||||||
|
Loading…
Reference in New Issue
Block a user