Skip Menu |
Report information
Id: 131970
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: martin [at] senfdax.de
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: LTA error handling: shouldnt the Failure convert into an Exception
From: Martin Barth <martin [...] senfdax.de>
To: rakudobug [...] perl.org
Date: Sun, 27 Aug 2017 12:52:41 +0200
Download (untitled) / with headers
text/plain 594b
<ufobat> m: my $c = "Some::Thing"; ::($c).new() <camelia> rakudo-moar f097e5: OUTPUT: «Failed␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤» <ufobat> this error is not really helpful :( <ufobat> shoudn't this failure be converted into an exception? i'd expect something like this: <ufobat> m: my $c = "Some::Thing"; try { ::($c).new(); CATCH {default { $_.throw } } } <camelia> rakudo-moar f097e5: OUTPUT: «No such symbol 'Some::Thing'␤ in block at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤» <Skarsnik> you can fill a bug repport for that I think
On Sun, 27 Aug 2017 04:31:45 -0700, martin@senfdax.de wrote: Show quoted text
> <ufobat> m: my $c = "Some::Thing"; ::($c).new() > <camelia> rakudo-moar f097e5: OUTPUT: «Failed␤␤Actually thrown at:␤ in > block <unit> at <tmp> line 1␤␤» > <ufobat> this error is not really helpful :( > <ufobat> shoudn't this failure be converted into an exception? i'd > expect something like this: > <ufobat> m: my $c = "Some::Thing"; try { ::($c).new(); CATCH {default { > $_.throw } } } > <camelia> rakudo-moar f097e5: OUTPUT: «No such symbol 'Some::Thing'␤ in > block at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤» > <Skarsnik> you can fill a bug repport for that I think
It's not that the Failure is not converted to an exception... it's that the Exception being loaded into the Failure is empty of useful data: $perl6 -e 'my $c = "Some::Thing"; ::($c).new().perl.say' Failure.new(exception => X::AdHoc.new(payload => "Failed"), backtrace => Backtrace.new) ...something is not putting an X::NoSuchSymbol into the Failure.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org