protected function buildResponseBody($e) { $context = ''; foreach (Ergo::errorContext()->export() as $key => $value) { $context .= "{$key}: {$value}\n"; } return sprintf('<h1>Error: %s</h1><pre>%s</pre><h2>Context</h2><pre>%s</pre>', $e->getMessage(), $e->__toString(), $context); }