Re: svn commit: r598813 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r598813 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java

Jacques Le Roux
Administrator
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);
>
>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r598813 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java

Jacopo Cappellato
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);
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r598813 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java

Jacopo Cappellato
Looking at the patch: should we adopt a similar strategy for the
include-form, include-menu, include-screen ? (I.e. print to screen the
error message instead of throwing an exception)

Jacopo


Jacopo Cappellato wrote:

> 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);
>>>
>>>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r598813 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java

Jacques Le Roux
Administrator
In reply to this post by Jacopo Cappellato
Thanks Jacopo,

I compared with repo and it appeared that I had something weird there : I had a merge with a copy from old ofbiz.org repo. I checked
it's the only one among my working copies. Not sure why, surely a test done someday.

Anyway I reverted and of course it's ok, sorry for bother (especially Si)

Jacques

De : "Jacopo Cappellato" <[hidden email]>

> 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);
> >>
> >>
>