Uploaded image for project: 'Nutch'
  1. Nutch
  2. NUTCH-1883

bin/crawl: use function to run bin/nutch and check exit value

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9, 2.2.1
    • 2.3, 1.10
    • None
    • None
    • Patch Available

    Description

      In bin/crawl for every Nutch command the exit value is checked explicitly:

      "$bin/nutch" ...
      RETCODE=$?
      if [ $RETCODE -ne 0 ] 
      then exit $RETCODE 
      fi
      

      This could be simplified by calling bin/nutch from one function which does the check. The function could also echo the command, show an error message, etc. The main advantage is short and clear code. In case a special treatment of exit values is required (cf. NUTCH-1829) we still could call bin/nutch directly.

      Attachments

        1. NUTCH-1883-2x-v1.patch
          4 kB
          Sebastian Nagel
        2. NUTCH-1883-trunk-v1.patch
          6 kB
          Sebastian Nagel
        3. NUTCH-1883-trunk-v2.patch
          1 kB
          Sebastian Nagel
        4. NUTCH-1883-trunk-v2.patch
          1 kB
          Sebastian Nagel

        Activity

          People

            snagel Sebastian Nagel
            snagel Sebastian Nagel
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: