Menu

#16 <try> cannot catch exception raised by invalid URI in <http>

Backlog
accepted
nobody
None
5
2015-01-18
2009-07-17
No

when an invalid URI is passed to <http>, the resulting IllegalArgumentException stops the scraper even if surrounded by a <try> block. eg :

<config>
  <try>
    <body>
      <http url="http://web-harvest.sf.net/ê" />
    </body>
    <catch/>
  </try>
</config>

Discussion

  • Jonathan Derque

    Jonathan Derque - 2009-07-17

    config file to reproduce the problem

     
  • Jonathan Derque

    Jonathan Derque - 2009-07-17

    trivial fix

     
  • Maciej Czapiewski

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,5 +1,5 @@
     when an invalid URI is passed to <http>, the resulting IllegalArgumentException stops the scraper even if surrounded by a <try> block. eg :
    -
    +~~~~~~
     <config>
       <try>
         <body>
    @@ -8,3 +8,4 @@
         <catch/>
       </try>
     </config>
    +~~~~~~
    
     
  • Maciej Czapiewski

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,5 @@
     when an invalid URI is passed to <http>, the resulting IllegalArgumentException stops the scraper even if surrounded by a <try> block. eg :
    +
     ~~~~~~
     <config>
       <try>
    
     
  • Piotr Dyraga

    Piotr Dyraga - 2012-11-15
     
  • Maciej Czapiewski

    In this case we need to do bigger modification, so I have created Feature Request https://sourceforge.net/p/web-harvest/feature-requests/34/ which should allow to handle other exception's type than BaseException.

     
  • Maciej Czapiewski

    • status: open --> accepted
     

Log in to post a comment.