Shouldn't the error message be internationalized?
-Adrian [hidden email] wrote: > Author: jleroux > Date: Mon Feb 23 08:15:40 2009 > New Revision: 746914 > > URL: http://svn.apache.org/viewvc?rev=746914&view=rev > Log: > A patch from Eric De Maulde "Avoid error when an uncompatible original image is uploaded" (https://issues.apache.org/jira/browse/OFBIZ-2200) - OFBIZ-2200 > > Modified: > ofbiz/trunk/applications/product/src/org/ofbiz/image/ImageTransform.java > > Modified: ofbiz/trunk/applications/product/src/org/ofbiz/image/ImageTransform.java > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/image/ImageTransform.java?rev=746914&r1=746913&r2=746914&view=diff > ============================================================================== > --- ofbiz/trunk/applications/product/src/org/ofbiz/image/ImageTransform.java (original) > +++ ofbiz/trunk/applications/product/src/org/ofbiz/image/ImageTransform.java Mon Feb 23 08:15:40 2009 > @@ -293,13 +293,19 @@ > imgUrlMap.put(sizeType, imageUrl); > > } // scaleImgMap > - } // sizeIter > - } > + } // sizeIter > + > + result.put("responseMessage", "success"); > + result.put("imageUrlMap", imgUrlMap); > + result.put("original", resultBufImgMap); > + return result; > > - result.put("responseMessage", "success"); > - result.put("imageUrlMap", imgUrlMap); > - result.put("original", resultBufImgMap); > - return result; > + }else{ > + String errMsg = "Impossible to scale original image : " + filenameToUse; > + Debug.logError(errMsg, module); > + result.put("errorMessage", errMsg); > + return ServiceUtil.returnError(errMsg); > + } > > } // scaleImageInAllSize > > > > |
Administrator
|
Actually I'm refactoring all the file. There were much more than that missing (even if it works well). Though I think I will ask
Eric for this particular feature ;o) Related to this effort I will update Jdom Jacques From: "Adrian Crum" <[hidden email]> > Shouldn't the error message be internationalized? > > -Adrian > > [hidden email] wrote: >> Author: jleroux >> Date: Mon Feb 23 08:15:40 2009 >> New Revision: 746914 >> >> URL: http://svn.apache.org/viewvc?rev=746914&view=rev >> Log: >> A patch from Eric De Maulde "Avoid error when an uncompatible original image is uploaded" >> (https://issues.apache.org/jira/browse/OFBIZ-2200) - OFBIZ-2200 >> >> Modified: >> ofbiz/trunk/applications/product/src/org/ofbiz/image/ImageTransform.java >> >> Modified: ofbiz/trunk/applications/product/src/org/ofbiz/image/ImageTransform.java >> URL: >> http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/image/ImageTransform.java?rev=746914&r1=746913&r2=746914&view=diff >> ============================================================================== >> --- ofbiz/trunk/applications/product/src/org/ofbiz/image/ImageTransform.java (original) >> +++ ofbiz/trunk/applications/product/src/org/ofbiz/image/ImageTransform.java Mon Feb 23 08:15:40 2009 >> @@ -293,13 +293,19 @@ >> imgUrlMap.put(sizeType, imageUrl); >> } // scaleImgMap >> - } // sizeIter - } >> + } // sizeIter >> + + result.put("responseMessage", "success"); >> + result.put("imageUrlMap", imgUrlMap); >> + result.put("original", resultBufImgMap); >> + return result; - result.put("responseMessage", "success"); >> - result.put("imageUrlMap", imgUrlMap); >> - result.put("original", resultBufImgMap); >> - return result; + }else{ >> + String errMsg = "Impossible to scale original image : " + filenameToUse; >> + Debug.logError(errMsg, module); >> + result.put("errorMessage", errMsg); >> + return ServiceUtil.returnError(errMsg); >> + } } // scaleImageInAllSize > |
Free forum by Nabble | Edit this page |