Improve Mustache exception types, catchability.
* Subclass common exception types (runtime, logic, invalid argument). * Add new "unknown x" exceptions for filters, helpers and templates. * Make all Mustache exceptions implement Mustache_Exception interface… Gotta catch 'em all!
This commit is contained in:
@@ -85,9 +85,9 @@ class Mustache_Test_CompilerTest extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
* @expectedException Mustache_Exception_SyntaxException
|
||||
*/
|
||||
public function testCompilerThrowsUnknownNodeTypeException()
|
||||
public function testCompilerThrowsSyntaxException()
|
||||
{
|
||||
$compiler = new Mustache_Compiler;
|
||||
$compiler->compile('', array(array(Mustache_Tokenizer::TYPE => 'invalid')), 'SomeClass');
|
||||
|
||||
Reference in New Issue
Block a user