Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LTA error handling: shouldnt the Failure convert into an Exception #6471

Open
p6rt opened this issue Aug 27, 2017 · 4 comments
Open

LTA error handling: shouldnt the Failure convert into an Exception #6471

p6rt opened this issue Aug 27, 2017 · 4 comments

Comments

@p6rt
Copy link

@p6rt p6rt commented Aug 27, 2017

Migrated from rt.perl.org#131970 (status was 'open')

Searchable as RT131970$

@p6rt
Copy link
Author

@p6rt p6rt commented Aug 27, 2017

From martin@senfdax.de

<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

Loading

@p6rt
Copy link
Author

@p6rt p6rt commented Aug 27, 2017

From @skids

On Sun, 27 Aug 2017 04​:31​:45 -0700, martin@​senfdax.de wrote​:

<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.

Loading

@p6rt
Copy link
Author

@p6rt p6rt commented Aug 27, 2017

The RT System itself - Status changed from 'new' to 'open'

Loading

@p6rt
Copy link
Author

@p6rt p6rt commented Mar 18, 2019

From @salortiz

As a result for rakudo/rakudo#2764 with fix in rakudo/rakudo@c911065 I think this can be closed.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant