Author: sebb
Date: Mon Jan 29 17:36:51 2007
New Revision: 501276

URL: http://svn.apache.org/viewvc?view=rev&rev=501276
Log:
Remove catches for unthrown throws

Modified:
    
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java

Modified: 
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java?view=diff&rev=501276&r1=501275&r2=501276
==============================================================================
--- 
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java
 (original)
+++ 
jakarta/jmeter/branches/rel-2-2/src/protocol/http/org/apache/jmeter/protocol/http/modifier/AnchorModifier.java
 Mon Jan 29 17:36:51 2007
@@ -85,15 +85,11 @@
                } catch (UnsupportedEncodingException e) {
                }
                Document html;
-               try {
-                       int index = responseText.indexOf("<");
-                       if (index == -1) {
-                               index = 0;
-                       }
-                       html = (Document) 
HtmlParsingUtils.getDOM(responseText.substring(index));
-               } catch (SAXException e) {
-                       return;
+               int index = responseText.indexOf("<");
+               if (index == -1) {
+                       index = 0;
                }
+               html = (Document) 
HtmlParsingUtils.getDOM(responseText.substring(index));
                addAnchorUrls(html, result, sampler, potentialLinks);
                addFormUrls(html, result, sampler, potentialLinks);
                addFramesetUrls(html, result, sampler, potentialLinks);
@@ -154,13 +150,9 @@
                Iterator iter = urls.iterator();
                while (iter.hasNext()) {
                        HTTPSamplerBase newUrl = (HTTPSamplerBase) iter.next();
-                       try {
-                               newUrl.setMethod(HTTPSamplerBase.POST);
-                               if (HtmlParsingUtils.isAnchorMatched(newUrl, 
config)) {
-                                       potentialLinks.add(newUrl);
-                               }
-                       } catch 
(org.apache.oro.text.regex.MalformedPatternException e) {
-                               log.error("Bad pattern", e);
+                       newUrl.setMethod(HTTPSamplerBase.POST);
+                       if (HtmlParsingUtils.isAnchorMatched(newUrl, config)) {
+                               potentialLinks.add(newUrl);
                        }
                }
        }
@@ -189,8 +181,7 @@
                                        potentialLinks.add(newUrl);
                                }
                        } catch (MalformedURLException e) {
-                       } catch 
(org.apache.oro.text.regex.MalformedPatternException e) {
-                               log.error("Bad pattern", e);
+                   log.warn("Bad URL "+e);
                        }
                }
        }
@@ -222,8 +213,6 @@
                }
            } catch (MalformedURLException e) {
                log.warn("Bad URL "+e);
-           } catch (org.apache.oro.text.regex.MalformedPatternException e) {
-               log.error("Bad pattern", e);
            }
        }
    }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to