Hello 2 everyone!

I have wrote own custom directive for Velocity template engine.
 And try to put parameters without quotes: like #MY_DIR(gsgffgf) and
got an exception, while #MY_DIR( 'gsgffgf' ) works well.

Is there any way to handle it? Need same behavior without quotes.

Evgeny.

Here is exception I got:

org.apache.velocity.runtime.directive.MacroParseException: Invalid arg
#0 in directive #MY_DIR

        at org.apache.velocity.runtime.parser.Parser.Directive(Parser.java:802)
        at org.apache.velocity.runtime.parser.Parser.Statement(Parser.java:373)
        at org.apache.velocity.runtime.parser.Parser.process(Parser.java:311)
        at org.apache.velocity.runtime.parser.Parser.parse(Parser.java:105)
        at 
org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:1131)
        at 
org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:1086)
        at 
ru.diasoft.fa.dsutils.macro.MacrosProcessor.processTemplate(MacrosProcessor.java:53)
        at 
ru.diasoft.fa.dsutils.macro.MacrosProcessorTest.testNoLockDirective3(MacrosProcessorTest.java:30)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at junit.framework.TestCase.runTest(TestCase.java:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at 
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
        at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to