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

Failure objects don't preserve the original error message #2398

Closed
p6rt opened this issue Mar 31, 2011 · 8 comments
Closed

Failure objects don't preserve the original error message #2398

p6rt opened this issue Mar 31, 2011 · 8 comments

Comments

@p6rt
Copy link

p6rt commented Mar 31, 2011

Migrated from rt.perl.org#87420 (status was 'resolved')

Searchable as RT87420$

@p6rt
Copy link
Author

p6rt commented Mar 31, 2011

From sean@miscoranda.com

16​:57 <sbp> rakudo​: my @​random-stuff := 1, 3, 4, 7 ... *; say
@​random-stuff[^10].perl
16​:57 <p6eval> rakudo 4bf132​: OUTPUT«Method 'count' not found for
invocant of class 'Failure'␤ in <anon> at line 861​:CORE.setting␤ in
'List​::at_pos' at line 1␤ in 'Any​::postcircumfix​:<[ ]>' at line
1808​:CORE.setting␤ in <anon> at line 1␤ in 'Any​::postcircumfix​:<[
]>' at line 1␤ in main program body at line
16​:57 <p6eval> ..1␤»
16​:57 <sbp> — via jasondavies. is a bug?

--
Sean B. Palmer, http://inamidst.com/sbp/

@p6rt
Copy link
Author

p6rt commented Mar 31, 2011

From @masak

<patrickas> spb reported
<patrickas> rakudo​: my @​random-stuff := 1, 3, 4, 7 ... *; say
@​random-stuff[^10].perl
<p6eval> rakudo 4bf132​: OUTPUT«Method 'count' not found for invocant
of class 'Failure'␤ in <anon> at line 861​:CORE.setting [...]
<patrickas> I replied with
<patrickas> rakudo​: use fatal; my @​random-stuff := 1, 3, 4, 7 ... *;
say @​random-stuff[^10].perl
<p6eval> rakudo 4bf132​: OUTPUT«Unable to figure out pattern of series [...]
<patrickas> that's what I mean by louder ... unless you "use fatal"
you have no idea what went wrong
<masak> huh.
<masak> yes, that one should definitely complain louder.
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Apr 1, 2011

From sean@miscoranda.com

Just to be clear, I'm suggesting the error message should be about the
magic sequence failing. I guess though that since the sequence is
lazy, you can't throw it until you consume. But then why should the
access to .count come before the Failure of the is mooted?

However it's fixed, it's not a very informative error message.

--
Sean B. Palmer, http://inamidst.com/sbp/

@p6rt
Copy link
Author

p6rt commented Apr 1, 2011

From patrick.abisalloum@gmail.com

On Fri Apr 01 01​:26​:41 2011, sean@​miscoranda.com wrote​:

However it's fixed, it's not a very informative error message.

The actual error message is "Unable to figure out pattern of series" which
exactly what we want, the problem is that in the absence of 'use fatal'
this message does not show up and is clobbered by other failures occurring
later.

@p6rt
Copy link
Author

p6rt commented Apr 1, 2011

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

@p6rt
Copy link
Author

p6rt commented Apr 1, 2011

From patrick.abisalloum@gmail.com

Examples of other places where failure message are not shown either.

say (3+4i).Real;
say ()[-3];
say [*..*];
say ('a'=>'b').Numeric;

And the discussion about it on #perl6 :
http://irclog.perlgeek.de/perl6/2011-04-01#i_3445985

@p6rt
Copy link
Author

p6rt commented May 29, 2012

From @moritz

Now produces (1, 3, 4, 7, Failure.new(exception =>
X​::Sequence​::Deduction.new())

If you print the sequence, the actual error message will be generated.

@p6rt
Copy link
Author

p6rt commented May 29, 2012

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed May 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant