Changeset 2145


Ignore:
Timestamp:
08/29/18 20:15:46 (6 years ago)
Author:
nanardon
Message:

Avoid some die due to untrap error

File:
1 edited

Legend:

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

    r1865 r2145  
    139139                my @objs; 
    140140                if ($otype eq '@') { 
    141                     if (@{$env->{_lastsearch}}) { 
     141                    if (@{$env->{_lastsearch} || []}) { 
    142142                        $otype = $env->{_lastsearchtype}; 
    143143                        @ids = @{$env->{_lastsearch}}; 
     
    552552            code => sub { 
    553553                my ($env, $attrname, @objects) = @_; 
    554                 my $totype = $env->base->attribute($env->{_otype}, 
    555                     $attrname)->reference or return; 
     554 
     555                my $attr = $env->base->attribute( 
     556                    $env->{_otype}, 
     557                    $attrname 
     558                ) or do { 
     559                    print $OUT "No attribute $attrname"; 
     560                    return; 
     561                }; 
     562                my $totype = $attr->reference or return; 
    556563 
    557564                if (! @objects) { 
Note: See TracChangeset for help on using the changeset viewer.