Author: jleroux
Date: Wed Oct 30 06:32:29 2013
New Revision: 1536981
URL: http://svn.apache.org/r1536981
Log:
No functional changes, simply fill swallowed catches with debug log warnings
Modified:
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoConfigUtil.java
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/UrlRegexpConfigUtil.java
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/ftl/CatalogUrlSeoTransform.java
Modified:
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java?rev=1536981&r1=1536980&r2=1536981&view=diff
==============================================================================
---
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java
(original)
+++
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/CategoryServices.java
Wed Oct 30 06:32:29 2013
@@ -31,7 +31,6 @@ import javax.servlet.http.HttpServletRes
import javolution.util.FastList;
import javolution.util.FastMap;
-
import net.sf.json.JSONObject;
import org.ofbiz.base.util.Debug;
@@ -500,7 +499,7 @@ public class CategoryServices {
}
}
} catch (GenericEntityException e) {
- e.printStackTrace();
+ Debug.logWarning(e, module);
}
}
Modified:
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoConfigUtil.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoConfigUtil.java?rev=1536981&r1=1536980&r2=1536981&view=diff
==============================================================================
---
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoConfigUtil.java
(original)
+++
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/SeoConfigUtil.java
Wed Oct 30 06:32:29 2013
@@ -120,7 +120,7 @@ public class SeoConfigUtil {
regexpIfMatch = perlCompiler.compile(regexIfMatch,
Perl5Compiler.DEFAULT_MASK);
} catch (MalformedPatternException e1) {
- // do nothing
+ Debug.logWarning(e1, module);
}
debug = Boolean.parseBoolean(UtilXml.childElementValue(
rootElement, ELEMENT_DEBUG, "false"));
@@ -160,7 +160,7 @@ public class SeoConfigUtil {
urlpattern,
Perl5Compiler.DEFAULT_MASK);
userExceptionPatterns.add(pattern);
} catch (MalformedPatternException e) {
- // skip this url replacement if any
error happened
+ Debug.logWarning(e, "skip this url
replacement if any error happened", module);
}
}
}
@@ -168,7 +168,7 @@ public class SeoConfigUtil {
}
}
} catch (NullPointerException e) {
- // no "jsessionid" element
+ Debug.logWarning(e, "no \"jsessionid\" element", module);
}
// parse name-filters elements
@@ -189,12 +189,12 @@ public class SeoConfigUtil {
nameFilters.put(charaterPattern,
replacement);
} catch (MalformedPatternException e) {
- // skip this filter (character-pattern
replacement) if any error happened
+ Debug.logWarning(e, "skip this filter
(character-pattern replacement) if any error happened", module);
}
}
}
} catch (NullPointerException e) {
- // no "name-filters" element
+ Debug.logWarning(e, "no \"name-filters\" element", module);
}
// parse config elements
@@ -217,7 +217,7 @@ public class SeoConfigUtil {
replacement);
seoPatterns.put(urlpattern, pattern);
} catch (MalformedPatternException e) {
- // skip this url replacement if any error happened
+ Debug.logWarning(e, "skip this url replacement if
any error happened", module);
}
}
}
@@ -246,18 +246,18 @@ public class SeoConfigUtil {
try {
responseCodeInt =
Integer.valueOf(responseCode);
} catch (NumberFormatException nfe) {
- // do nothing
+ Debug.logWarning(nfe, module);
}
forwardResponseCodes.put(urlpattern,
responseCodeInt);
}
} catch (MalformedPatternException e) {
- // skip this url replacement if any error happened
+ Debug.logWarning(e, "skip this url replacement if
any error happened", module);
}
}
}
} catch (NullPointerException e) {
- // no "config" element
+ Debug.logWarning(e, "no \"config\" element", module);
}
} catch (SAXException e) {
result = "error";
Modified:
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/UrlRegexpConfigUtil.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/UrlRegexpConfigUtil.java?rev=1536981&r1=1536980&r2=1536981&view=diff
==============================================================================
---
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/UrlRegexpConfigUtil.java
(original)
+++
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/UrlRegexpConfigUtil.java
Wed Oct 30 06:32:29 2013
@@ -125,7 +125,7 @@ public class UrlRegexpConfigUtil {
try {
m_regexpIfMatch = m_perlCompiler.compile(regexIfMatch,
Perl5Compiler.DEFAULT_MASK);
} catch (MalformedPatternException e1) {
- // do nothing
+ Debug.logWarning(e1, module);
}
m_debug =
Boolean.parseBoolean(UtilXml.childElementValue(rootElement, ELEMENT_DEBUG,
"false"));
@@ -172,7 +172,7 @@ public class UrlRegexpConfigUtil {
}
}
} catch (NullPointerException e) {
- // no "category-url" element
+ Debug.logWarning(e, "no \"category-url element\"", module);
}
// parse jsessionid element
@@ -208,7 +208,7 @@ public class UrlRegexpConfigUtil {
Pattern pattern =
m_perlCompiler.compile(urlpattern, Perl5Compiler.DEFAULT_MASK);
m_userExceptionPatterns.add(pattern);
} catch (MalformedPatternException e) {
- // skip this url replacement if any
error happened
+ Debug.logWarning(e, "skip this url
replacement if any error happened", module);
}
}
}
@@ -216,7 +216,7 @@ public class UrlRegexpConfigUtil {
}
}
} catch (NullPointerException e) {
- // no "jsessionid" element
+ Debug.logWarning(e, "no \"jsessionid\" element", module);
}
// parse name-filters elements
@@ -231,12 +231,13 @@ public class UrlRegexpConfigUtil {
m_perlCompiler.compile(charaterPattern,
Perl5Compiler.DEFAULT_MASK);
m_nameFilters.put(charaterPattern, replacement);
} catch (MalformedPatternException e) {
- // skip this filter (character-pattern
replacement) if any error happened
+ Debug.logWarning(e, "skip this filter
(character-pattern replacement) if any error happened", module);
+
}
}
}
} catch (NullPointerException e) {
- // no "name-filters" element
+ Debug.logWarning(e, "no \"name-filters\" element", module);
}
// parse config elements
@@ -253,7 +254,7 @@ public class UrlRegexpConfigUtil {
m_seoReplacements.put(urlpattern, replacement);
m_seoPatterns.put(urlpattern, pattern);
} catch (MalformedPatternException e) {
- // skip this url replacement if any error happened
+ Debug.logWarning(e, "skip this url replacement if
any error happened", module);
}
}
}
@@ -275,18 +276,18 @@ public class UrlRegexpConfigUtil {
try {
responseCodeInt =
Integer.valueOf(responseCode);
} catch (NumberFormatException nfe) {
- // do nothing
+ Debug.logWarning(nfe, module);
}
m_forwardResponseCodes.put(urlpattern,
responseCodeInt);
}
} catch (MalformedPatternException e) {
- // skip this url replacement if any error happened
+ Debug.logWarning(e, "skip this url replacement if
any error happened", module);
}
}
}
} catch (NullPointerException e) {
- // no "config" element
+ Debug.logWarning(e, "no \"config\" element", module);
}
} catch (SAXException e) {
result = "error";
Modified:
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/ftl/CatalogUrlSeoTransform.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/ftl/CatalogUrlSeoTransform.java?rev=1536981&r1=1536980&r2=1536981&view=diff
==============================================================================
---
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/ftl/CatalogUrlSeoTransform.java
(original)
+++
ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/product/src/org/ofbiz/product/category/ftl/CatalogUrlSeoTransform.java
Wed Oct 30 06:32:29 2013
@@ -81,7 +81,7 @@ public class CatalogUrlSeoTransform impl
try {
m_asciiPattern = m_perlCompiler.compile(m_asciiRegexp,
Perl5Compiler.DEFAULT_MASK);
} catch (MalformedPatternException e1) {
- // do nothing
+ Debug.logWarning(e1, module);
}
}