Changeset 2310


Ignore:
Timestamp:
11/28/19 16:10:47 (5 years ago)
Author:
nanardon
Message:

Fix: trap error when base does not exist

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts.pm

    r2260 r2310  
    1212use LATMOS::Accounts::I18N; 
    1313 
    14 our $VERSION = '6.0.0'; 
     14our $VERSION = '6.1.0'; 
    1515 
    1616binmode(STDOUT, ":utf8"); 
     
    134134    my ($self, $section) = @_; 
    135135    # this method perform a cache 
    136     my $base = $self->_load_base($section || $self->default_base_name); 
     136 
     137    my $basename = $section || $self->default_base_name; 
     138 
     139    my $base = $self->_load_base($basename) or do { 
     140        la_log(LA_ERR, "%s didn't load", $basename); 
     141        return; 
     142    }; 
    137143 
    138144    $base->load or do { 
Note: See TracChangeset for help on using the changeset viewer.