From 821c56da619f4735717987aa28a4e25c19e27d6f Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 24 Aug 2021 00:35:38 +1200 Subject: Use specific exception name --- libexec/check_ftp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/check_ftp b/libexec/check_ftp index 3ff4654..ca44420 100644 --- a/libexec/check_ftp +++ b/libexec/check_ftp @@ -34,7 +34,7 @@ use 5.010_001; # Import required modules use English qw(-no_match_vars); -use Exception::Class ( PluginException => { alias => 'throw' } ); +use Exception::Class qw(TLSException); use Monitoring::Plugin; use Net::FTP; use Try::Tiny; @@ -98,7 +98,7 @@ try { # If we connected and the server reports that it supports TLS, try it if ( defined $mp->opts->starttls ) { my $ssl = $ftp->can_ssl - or throw 'Client can\'t TLS'; + or TLSException->throw('Client can\'t TLS'); $ftp->feature('AUTH TLS') or $mp->add_message( WARNING => 'AUTH TLS not listed in features' ); $ftp->starttls -- cgit v1.2.3