public function run()
{
try {
$this->onStartup($this);
$this->processRequest($this->createInitialRequest());
$this->onShutdown($this);
} catch (\Throwable $e) {
} catch (\Exception $e) {
}
if (isset($e)) {
$this->onError($this, $e);
if ($this->catchExceptions && $this->errorPresenter) {
try {
$this->processException($e);
$this->onShutdown($this, $e);
return;
} catch (\Throwable $e) {
$this->onError($this, $e);
} catch (\Exception $e) {
$this->onError($this, $e);
}
}
$this->onShutdown($this, $e);
throw $e;
}
}