aboutsummaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/index.php b/index.php
index 6b9f6fd3..f118d500 100644
--- a/index.php
+++ b/index.php
@@ -14,10 +14,9 @@ if (isset($argv)) {
}
try {
+ $actionFac = new ActionFactory();
- $actionFac = new \ActionFactory();
-
- if(array_key_exists('action', $params)) {
+ if (array_key_exists('action', $params)) {
$action = $actionFac->create($params['action']);
$action->userData = $params;
$action->execute();
@@ -25,8 +24,9 @@ try {
$showInactive = filter_input(INPUT_GET, 'show_inactive', FILTER_VALIDATE_BOOLEAN);
echo BridgeList::create($showInactive);
}
-} catch(\Throwable $e) {
+} catch (\Throwable $e) {
error_log($e);
+
$code = $e->getCode();
if ($code !== -1) {
header('Content-Type: text/plain', true, $code);