diff options
author | Greg Sabino Mullane | 2012-02-20 20:27:32 +0000 |
---|---|---|
committer | Greg Sabino Mullane | 2012-02-20 20:27:32 +0000 |
commit | 05ced1151488666c37f04ec55ac308ef56b93dae (patch) | |
tree | 336e663cd0c2f0f31eaac460da5f84ed0349bc88 /check_postgres.pl | |
parent | 0f18b18e09a3160ac89ed2d1a2af00fe5f1ba148 (diff) |
Cleaner "ERROR" output
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index 9a0746214..4fc3c0005 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -1271,6 +1271,10 @@ sub ndie { eval { File::Temp::cleanup(); }; my $msg = shift; chomp $msg; + ## If this message already starts with an ERROR, filter that out for prettiness + $msg =~ s/^\s*ERROR:\s*/ /; + ## Trim whitespace + $msg =~ s/^\s*(.+)\s*$/$1/; print "ERROR: $msg\n"; exit 3; } |