diff --git a/lib/chibi-core b/lib/chibi-core index beeb483b..0ec5cbda 160000 --- a/lib/chibi-core +++ b/lib/chibi-core @@ -1 +1 @@ -Subproject commit beeb483bbeef8102fb54f7197d693b0934f063e1 +Subproject commit 0ec5cbda4b34f6273e2e02196cf6c16379623bb3 diff --git a/src/Bootstrap.php b/src/Bootstrap.php index 69b4a1a2..dcb66a0b 100644 --- a/src/Bootstrap.php +++ b/src/Bootstrap.php @@ -51,6 +51,12 @@ class Bootstrap $this->context->viewName = 'error-simple'; (new \Chibi\View())->renderFile($this->context->layoutName); } + catch (\Chibi\MissingViewFileException $e) + { + $this->context->json = true; + $this->context->layoutName = 'layout-json'; + (new \Chibi\View())->renderFile($this->context->layoutName); + } catch (Exception $e) { $this->context->transport->errorMessage = rtrim($e->getMessage(), '.') . '.';