Jacques,
it works for me... I can see the writeError method defined inside of the
HtmlWidget class
Jacopo
Jacques Le Roux wrote:
Hi Si,
This does not compile, please can you fix it ? (I can't find from where come
this writeError mehtod in writeError(writer, errMsg);
I searched in Java APIs and Freemarker)
Thanks
Jacques
Author: sichen
Date: Tue Nov 27 15:12:00 2007
New Revision: 598813
URL: http://svn.apache.org/viewvc?rev=598813&view=rev
Log:
Report freemarker file not found error to the screen so we don't have to dig
through a very messy log to find it.
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java?rev=598813&r1=598812&r2=598813&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java
(original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java
Tue Nov 27 15:12:00 2007
@@ -90,6 +90,10 @@
if (insertWidgetBoundaryComments) {
writer.write(HtmlWidgetRenderer.buildBoundaryComment("End",
"Template", location));
}
+ } catch (IllegalArgumentException e) {
+ String errMsg = "Error rendering included template at location [" +
location + "]: " + e.toString();
+ Debug.logError(e, errMsg, module);
+ writeError(writer, errMsg);
} catch (MalformedURLException e) {
String errMsg = "Error rendering included template at location [" +
location + "]: " + e.toString();
Debug.logError(e, errMsg, module);