Updated View to use the new View_Exception

This commit is contained in:
Woody Gilk 2009-06-16 18:42:05 -05:00
parent e745172c6b
commit 40000b37c7

View file

@ -145,8 +145,7 @@ class View_Core {
* Sets the view filename. If the view file cannot be found, an exception * Sets the view filename. If the view file cannot be found, an exception
* will be thrown. * will be thrown.
* *
* @chainable * @throws View_Exception
* @throws Kohana_Exception
* @param string filename * @param string filename
* @return View * @return View
*/ */
@ -158,8 +157,9 @@ class View_Core {
} }
else else
{ {
throw new Kohana_Exception('The requested :type :file was not found', throw new View_Exception('The requested view :file could not be found', array(
array(':type' => 'view', ':file' => $file)); ':file' => $file,
));
} }
return $this; return $this;
@ -274,7 +274,7 @@ class View_Core {
if (empty($this->_file)) if (empty($this->_file))
{ {
// The user has not specified a view file yet // The user has not specified a view file yet
throw new Kohana_Exception('No file specified for view, unable to render'); throw new View_Exception('You must set the file to use within your view before rendering');
} }
// Combine global and local data. Global variables with the same name // Combine global and local data. Global variables with the same name