TT#68300 Use croak() instead of die() in module code

This prints more helpful messages, by outputting the call site location.

Change-Id: I8d47fdfd8a290c7858431c44da8a2525f0fe1f96
changes/05/34105/4
Guillem Jover 6 years ago
parent f555007bf1
commit 9ede59c5e9

@ -4,6 +4,7 @@ use warnings;
use feature qw(state);
use English qw(-no_match_vars);
use Carp;
use Config::Tiny;
use JSON::XS;
use IO::Socket::SSL;
@ -16,7 +17,7 @@ sub _load_config_defaults {
my $cfg;
$cfg = Config::Tiny->read($cfg_file)
or die "Cannot read $cfg_file: $ERRNO";
or croak("Cannot read $cfg_file: $ERRNO");
Readonly my $config => {
host => $cfg->{_}->{NGCP_API_IP},

Loading…
Cancel
Save