summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/icli5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/icli b/bin/icli
index 1e15305..3cceb7c 100755
--- a/bin/icli
+++ b/bin/icli
@@ -7,6 +7,7 @@ use strict;
use warnings;
use 5.010;
+use Carp qw(croak);
use Date::Format;
use Getopt::Long qw/:config bundling/;
use Term::ANSIColor;
@@ -364,7 +365,7 @@ sub service_state {
when (1) { return with_colour( ' WARNING', 'black on_yellow' ) }
when (2) { return with_colour( 'CRITICAL', 'white on_red' ) }
when (3) { return with_colour( ' UNKNOWN', 'white on_blue' ) }
- default { die("Unknown service state: $digit\n") }
+ default { croak("Unknown service state: $digit\n") }
}
}
@@ -379,7 +380,7 @@ sub host_state {
when (0) { return with_colour( ' OK ', 'black on_green' ) }
when (1) { return with_colour( ' DOWN ', 'white on_red' ) }
when (2) { return with_colour( 'UNREACHABLE', 'white on_blue' ) }
- default { die("Unknown host state: $digit\n") }
+ default { croak("Unknown host state: $digit\n") }
}
}