Show
Ignore:
Timestamp:
04/23/10 20:07:11 (8 years ago)
Author:
Mark Harrison <mark@omniti.com>
git-committer:
Mark Harrison <mark@omniti.com> 1272053231 +0000
git-parent:

[117de5423d008dc004459bff76cfcd44a3ab4068]

git-author:
Mark Harrison <mark@omniti.com> 1272053231 +0000
Message:

Change modules to use die instead of manually returning an error metric

git-svn-id: https://labs.omniti.com/resmon/branches/resmon2@314 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lib/Core/Pgrep.pm

    r4cff28c rd1526ca  
    7575 
    7676    my $count = run_command("$pgrep_path", "-c$full", "$config->{pattern}"); 
    77     if (!defined($count)) { 
    78         return { 
    79             "error" => ["Unable to run pgrep command", "s"] 
    80         } 
    81     } 
     77    die "Unable to run pgrep command\n" if (!defined($count)); 
    8278    chomp $count; 
    8379 
     
    8985        # We didn't get a count as expected. This can happen if you didn't 
    9086        # provide a pattern or something else went wrong. 
    91         return { 
    92             "error" => ["Pgrep gave unexpected output: $count", "s"] 
    93         }; 
     87        die "Pgrep gave unexpected output: $count\n"; 
    9488    }; 
    9589};