diff options
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-01-22 01:37:10 -0500 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-01-22 01:37:10 -0500 |
commit | c4f93de55930896e83d3abb519190704332b4e8f (patch) | |
tree | 0cb9ee5f75fef739e02a166990372c2e876156ef /lib/Nagios/Plugin/Config.pm | |
parent | 67a45638154221708da7f92451143475bdc229ac (diff) | |
download | monitoring-plugin-perl-c4f93de55930896e83d3abb519190704332b4e8f.tar.gz |
Die as UNKNOWN instead of CRITICAL when default file is not found
(NB: shall we should die at all?)
Diffstat (limited to 'lib/Nagios/Plugin/Config.pm')
-rw-r--r-- | lib/Nagios/Plugin/Config.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Nagios/Plugin/Config.pm b/lib/Nagios/Plugin/Config.pm index d565973..11128dd 100644 --- a/lib/Nagios/Plugin/Config.pm +++ b/lib/Nagios/Plugin/Config.pm | |||
@@ -38,7 +38,8 @@ sub read | |||
38 | } | 38 | } |
39 | } | 39 | } |
40 | 40 | ||
41 | croak "Cannot find '$FILENAME1' or '$FILENAME2' in any standard location." unless $_[0]; | 41 | # Use die instead of croak, so we can pass a clean message downstream |
42 | die "Cannot find '$FILENAME1' or '$FILENAME2' in any standard location.\n" unless $_[0]; | ||
42 | } | 43 | } |
43 | 44 | ||
44 | $class->SUPER::read( @_ ); | 45 | $class->SUPER::read( @_ ); |