Changeset 1718

Show
Ignore:
Timestamp:
10/04/06 21:20:08
Author:
miyagawa
Message:

handle error code in CustomFeed-Script. Refs #412

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/CustomFeed/Script.pm

    r1717 r1718  
    3838    $context->log(debug => "Executing '$script'"); 
    3939    my $output = qx($script); 
     40    if ($?) { 
     41        $context->log(error => "Error happend while executing '$script': $?"); 
     42        return; 
     43    } 
    4044 
    4145    # TODO: check BOM? 
     
    5155        }; 
    5256        if ($@) { 
    53             $context->log(error => "Can't determine output format of $script"); 
     57            $context->log(error => "Failed to parse as YAML. Can't determine output format of $script"); 
     58            return; 
    5459        } 
    5560    } 
     61 
     62    return 1; 
    5663} 
    5764