Changeset 80
Legend:
- Unmodified
- Added
- Removed
-
shepherd
r79 r80 1521 1521 sub my_die { 1522 1522 my ($arg,@rest) = @_; 1523 my ($pack,$file,$line,$sub) = caller( 1);1523 my ($pack,$file,$line,$sub) = caller(0); 1524 1524 1525 1525 # check if we are in an eval() … … 1527 1527 printf STDERR " shepherd caught a die() within eval{} from file $file line $line\n"; 1528 1528 } else { 1529 if (!ref($arg)) {1530 printf STDERR "DIE at line %d in file %s\n",$line,$file;1531 CORE::die(join("",@rest));1532 } else {1533 CORE::die($arg,@rest);1534 }1535 } 1536 } 1537 1529 printf STDERR "\nDIE: line %d in file %s\n",$line,$file; 1530 if ($arg) { 1531 CORE::die($arg,@rest); 1532 } else { 1533 CORE::die(join("",@rest)); 1534 } 1535 } 1536 } 1537
