in reply to Re^2: eval error stack (implementation dependent)
in thread eval error stack
With @@, there would be no need to store references to the inner exception
Of course there would be. Because I want the inner exception to be stored when it is actually part of the cause of the outer exception and not because it was an incidental exception that was thrown and handled inside of the code that later detected an error and threw the outer exception.
The current value of $@ could be pushed onto it, if $@ hasn't been accessed before resetting.
But your original example was, in part:
if ($@) { die "baz failed!\n"; }
The first line I quoted accessed $@. So your own solution doesn't work in your own example. So you have an implementation hair to split there.
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: eval error stack (understood)
by shmem (Chancellor) on Nov 20, 2015 at 23:10 UTC | |
by tye (Sage) on Nov 21, 2015 at 01:23 UTC |