When my application screen Home.vm throws Exception, the following code in the catch block gets executed -

catch( Exception e )
{
data.getTemplateInfo().setScreenTemplate( "Error.vm" );

return;
}

In Error.vm, there are Velocity $variables that are assumed to have been set in the context by Error.java.

However, it seems that Error.java doesn't get called and the Velocity $variables are null when the template gets displayed. I guess the reason is that Error.java will only get called if Error.vm is accessed directly. If this reason is correct, how do I solve this design issue?

Thanks
Akshay

Reply via email to