Help for this page

Select Code to Download


  1. or download this
    unless ( $object->method('param') ) {
        ## somehow get $errstr
    ...
    }
    
    ## %erract contains such things as ('220' => sub { die $_ });
    
  2. or download this
    unless ( $object->method('param') ) {
        my ($errcode) = split ' ', $_;
        &$erract{$errcode}($_);
    }
    
  3. or download this
    eval { $object->method('param') }; if ($@) {
        my ($errcode) = split ' ', $@;
        &$erract{$errcode}($@);
    }