From 98e20c6ad18c10cc16419d70805171fbd56e5fb1 Mon Sep 17 00:00:00 2001 From: fadrian06 Date: Tue, 23 Jun 2026 18:31:37 -0400 Subject: [PATCH] import Exception --- flight/template/View.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/flight/template/View.php b/flight/template/View.php index 3366097..957acbf 100644 --- a/flight/template/View.php +++ b/flight/template/View.php @@ -4,6 +4,8 @@ declare(strict_types=1); namespace flight\template; +use Exception; + /** * The View class represents output to be displayed. It provides * methods for managing view data and inserts the data into @@ -105,7 +107,7 @@ class View * @param string $file Template file * @param ?array $templateData Template data * - * @throws \Exception If template not found + * @throws Exception If template not found */ public function render(string $file, ?array $templateData = null): void { @@ -113,7 +115,7 @@ class View if (!\file_exists($this->template)) { $normalized_path = self::normalizePath($this->template); - throw new \Exception("Template file not found: {$normalized_path}."); + throw new Exception("Template file not found: $normalized_path."); } \extract($this->vars);