Add documentation for some exceptions that can be thrown.

This commit is contained in:
Dave Smith-Hayes 2025-04-15 21:09:37 -04:00
parent d3d6d078c4
commit 281edf9104

View File

@ -6,6 +6,9 @@ use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Views\Twig;
use Slim\Routing\RouteContext;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Error\SyntaxError;
abstract class Handler
{
@ -53,6 +56,9 @@ abstract class Handler
* @param string $templateName The name of the template
* @param array $data The data for the template
* @return Response
* @throws LoaderError
* @throws RuntimeError
* @throws SyntaxError
*/
public function render(string $templateName, array $data = []): Response
{
@ -78,6 +84,8 @@ abstract class Handler
* @param string $html The raw Twig HTML to render
* @param array $data The data to injext into the HTML
* @return Response
* @throws LoaderError
* @throws SyntaxError
*/
public function renderInline(string $html, array $data = []): Response
{