Fix factory

This commit is contained in:
Maarten 2020-02-13 18:36:26 +01:00
parent a4c72c0d61
commit 4b601a7ffa

View file

@ -2,13 +2,15 @@
namespace Runtime\Http\View;
use Runtime\Contracts\View\Factory as FactoryContract;
use Runtime\Exceptions\ExceptionHandler;
use Runtime\Factory\AppFactory;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Error\SyntaxError;
class Factory extends AppFactory implements \Runtime\Contracts\View\Factory {
class Factory extends AppFactory implements FactoryContract
{
/**
* @var string
@ -31,11 +33,13 @@ class Factory extends AppFactory implements \Runtime\Contracts\View\Factory {
$this->arguments = $arguments;
try {
return $this->render();
return $this->render();
}
catch (\Exception $e) {
ExceptionHandler::make($e);
}
return '';
}
/**