Author: rb
Date: Tue Aug 14 11:13:27 2007
New Revision: 5911
Log:
- Fixed an issue that the wrong error message was given when: (a) an unknown
function is called and (b) the expression with that function uses one or
more binary operators.
Added:
trunk/Template/tests/regression_tests/custom_functions/incorrect/unknown_function_in_expression.in
(with props)
trunk/Template/tests/regression_tests/custom_functions/incorrect/unknown_function_in_expression.out
(with props)
Modified:
trunk/Template/src/parsers/tst_to_ast/implementations/tst_to_ast_transformer.php
Modified:
trunk/Template/src/parsers/tst_to_ast/implementations/tst_to_ast_transformer.php
==============================================================================
---
trunk/Template/src/parsers/tst_to_ast/implementations/tst_to_ast_transformer.php
[iso-8859-1] (original)
+++
trunk/Template/src/parsers/tst_to_ast/implementations/tst_to_ast_transformer.php
[iso-8859-1] Tue Aug 14 11:13:27 2007
@@ -289,6 +289,10 @@
}
catch ( Exception $e )
{
+ if ($e instanceof ezcTemplateParserException )
+ {
+ throw $e;
+ }
throw new ezcTemplateParserException( $type->source,
$type->endCursor, $type->endCursor,
ezcTemplateSourceToTstErrorMessages::MSG_TYPEHINT_FAILURE );
}
Added:
trunk/Template/tests/regression_tests/custom_functions/incorrect/unknown_function_in_expression.in
==============================================================================
---
trunk/Template/tests/regression_tests/custom_functions/incorrect/unknown_function_in_expression.in
(added)
+++
trunk/Template/tests/regression_tests/custom_functions/incorrect/unknown_function_in_expression.in
[iso-8859-1] Tue Aug 14 11:13:27 2007
@@ -1,0 +1,3 @@
+{if does_not_exist() && true || false}
+Yes
+{/if}
Propchange:
trunk/Template/tests/regression_tests/custom_functions/incorrect/unknown_function_in_expression.in
------------------------------------------------------------------------------
svn:eol-style = native
Added:
trunk/Template/tests/regression_tests/custom_functions/incorrect/unknown_function_in_expression.out
==============================================================================
---
trunk/Template/tests/regression_tests/custom_functions/incorrect/unknown_function_in_expression.out
(added)
+++
trunk/Template/tests/regression_tests/custom_functions/incorrect/unknown_function_in_expression.out
[iso-8859-1] Tue Aug 14 11:13:27 2007
@@ -1,0 +1,4 @@
+mock:1:5: Unknown function call: 'does_not_exist'
+
+{if does_not_exist() && true || fa
+ ^
Propchange:
trunk/Template/tests/regression_tests/custom_functions/incorrect/unknown_function_in_expression.out
------------------------------------------------------------------------------
svn:eol-style = native
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components