From 2f8db1963e97a38ad76a18d5acc8ecee0a0657a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Wed, 20 Jul 2011 23:29:04 +0300 Subject: Improve error messages when Locale::* or IO::Socket::* load fails on startup. --- HISTORY | 1 + vdradmind.pl | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/HISTORY b/HISTORY index 674941a..ef6c5fc 100644 --- a/HISTORY +++ b/HISTORY @@ -6,6 +6,7 @@ VDR-Portal: amair 201x-xx-xx: x.x.x - Fixed: --log 0 command line argument (Ville Skyttä). +- Improved: Startup error messages on module load failures (Ville Skyttä). 2011-06-03: 3.6.8 - Updated: Dutch translation (Submitted by Roel Koelewijn). diff --git a/vdradmind.pl b/vdradmind.pl index cc4ee5c..f49d9e9 100755 --- a/vdradmind.pl +++ b/vdradmind.pl @@ -46,7 +46,7 @@ if (eval { require Locale::gettext }) { } elsif (eval { require Locale::Messages }) { $localemod = 'Locale::Messages'; } else { - die("Locale::gettext or Locale::Messages is required!\n"); + die("Locale::gettext or Locale::Messages is required: $@"); } my $can_use_bind_textdomain_codeset = 1; eval { @@ -439,7 +439,7 @@ if ($UseIPv6) { $InetSocketModule = 'IO::Socket::INET6'; $VdrSocketModule = 'IO::Socket::INET6' if ($UseIPv6 == 2); } else { - die("ERROR: Can't load module IO::Socket::INET6! $!\n"); + die("ERROR: Can't load module IO::Socket::INET6: $@"); } } @@ -570,7 +570,7 @@ if ($UseSSL) { SSL_ca_path => "$CA_PATH" ); } else { - die("ERROR: Can't load module IO::Socket::SSL! $!\n"); + die("ERROR: Can't load module IO::Socket::SSL: $@"); } } else { $Socket = $InetSocketModule->new(Proto => 'tcp', -- cgit v1.2.3