You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2010/05/28 05:30:47 UTC

svn commit: r949088 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java

Author: lektran
Date: Fri May 28 03:30:47 2010
New Revision: 949088

URL: http://svn.apache.org/viewvc?rev=949088&view=rev
Log:
Be a little more explicit about what didn't return success when a preprocessor event fails

Modified:
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=949088&r1=949087&r2=949088&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Fri May 28 03:30:47 2010
@@ -301,7 +301,7 @@ public class RequestHandler {
                     String returnString = this.runEvent(request, response, event, null, "preprocessor");
                     if (returnString != null && !returnString.equalsIgnoreCase("success")) {
                         if (!returnString.contains(":_protect_:")) {
-                            throw new EventHandlerException("Pre-Processor event did not return 'success'.");
+                            throw new EventHandlerException("Pre-Processor event [" + event.invoke + "] did not return 'success'.");
                         } else { // protect the view normally rendered and redirect to error response view
                             returnString = returnString.replace(":_protect_:", "");
                             if (returnString.length() > 0) {



Re: svn commit: r949088 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java

Posted by Scott Gray <sc...@hotwaxmedia.com>.
On 29/05/2010, at 2:45 AM, Adam Heath wrote:

> lektran@apache.org wrote:
>> Author: lektran
>> Date: Fri May 28 03:30:47 2010
>> New Revision: 949088
>> 
>> URL: http://svn.apache.org/viewvc?rev=949088&view=rev
>> Log:
>> Be a little more explicit about what didn't return success when a preprocessor event fails
> 
> Should this be backported to some of the release branches?

Dunno, its not strictly a bug, just saves you having to drop in a breakpoint to see what event is causing problems.  I think ideally the event itself should be logging the problem if there is one.

Anyway, I'm not inclined to backport it but I wouldn't be bothered if someone else chose to.

Regards
Scott

Re: svn commit: r949088 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java

Posted by Adam Heath <do...@brainfood.com>.
lektran@apache.org wrote:
> Author: lektran
> Date: Fri May 28 03:30:47 2010
> New Revision: 949088
> 
> URL: http://svn.apache.org/viewvc?rev=949088&view=rev
> Log:
> Be a little more explicit about what didn't return success when a preprocessor event fails

Should this be backported to some of the release branches?

> 
> Modified:
>     ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
> 
> Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=949088&r1=949087&r2=949088&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original)
> +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Fri May 28 03:30:47 2010
> @@ -301,7 +301,7 @@ public class RequestHandler {
>                      String returnString = this.runEvent(request, response, event, null, "preprocessor");
>                      if (returnString != null && !returnString.equalsIgnoreCase("success")) {
>                          if (!returnString.contains(":_protect_:")) {
> -                            throw new EventHandlerException("Pre-Processor event did not return 'success'.");
> +                            throw new EventHandlerException("Pre-Processor event [" + event.invoke + "] did not return 'success'.");
>                          } else { // protect the view normally rendered and redirect to error response view
>                              returnString = returnString.replace(":_protect_:", "");
>                              if (returnString.length() > 0) {
> 
>