StackTraceElement[] stackTrace = e.getStackTrace();
for (StackTraceElement ele : stackTrace) {
String className = ele.getClassName();
if (className.startsWith("japidviews")) {
int lineNumber = ele.getLineNumber();
RendererClass applicationClass = japidClasses.get(className);
if (applicationClass != null) {
// let's get the line of problem
int oriLineNumber = applicationClass.mapJavaLineToJapidScriptLine(lineNumber);
if (oriLineNumber > 0) {
if (rendererClass != null) {
String path = applicationClass.getScriptPath();
JapidTemplateException te = new JapidTemplateException("Japid Error", path + "("
+ oriLineNumber + "): " + e.getClass().getName() + ": " + e.getMessage(),
oriLineNumber, path, applicationClass.getJapidSourceCode());
RenderResult rr = RenderInvokerUtils.invokeRender(rendererClass, te);
return (rr);
}
}
}