Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raise exceptions on missing elements.
We should be avoiding trigger_error() in Cake3, and instead use exceptions.
- Loading branch information
Showing
3 changed files
with
35 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org) | ||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) | ||
* | ||
* Licensed under The MIT License | ||
* Redistributions of files must retain the above copyright notice. | ||
* | ||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) | ||
* @link http://book.cakephp.org/2.0/en/development/testing.html | ||
* @since 3.0.0 | ||
* @license http://www.opensource.org/licenses/mit-license.php MIT License | ||
*/ | ||
namespace Cake\View\Error; | ||
|
||
use Cake\Error\Exception; | ||
|
||
/** | ||
* Used when an element file cannot be found. | ||
*/ | ||
class MissingElementException extends Exception { | ||
|
||
/** | ||
* Message template | ||
* | ||
* @var string | ||
*/ | ||
protected $_messageTemplate = 'Element file "%s" is missing.'; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters