diff --git a/flight/View.php b/flight/View.php index e4dd04d..5b2ef5b 100644 --- a/flight/View.php +++ b/flight/View.php @@ -77,7 +77,13 @@ class View { extract($this->data); - include $this->path.'/'.$this->template; + $file = $this->path.'/'.$this->template; + + if (!file_exists($file)) { + throw new Exception("Template file not found: $file."); + } + + include $file; } /**