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

Owner: Nobody
Requestors: juerd [at] tnx.nl
Cc:
AdminCc:

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



To: rakudobug [...] perl.org
Subject: LTA error message: unexpected argument
From: "Juerd Waalboer" <juerd [...] tnx.nl>
Date: Mon, 24 Jul 2017 16:07:58 +0200
Download (untitled) / with headers
text/plain 477b
It would be more awesome if "Unexected named argument 'foo' passed" was supplemented with the name of the function to which it was passed. sub xyzzy ($x, :$foo = False) { ... } sub bar ($y) { ... } xyzzy( bar "aoeusnthaoeusnth", :foo ) If the error message includes the name 'bar', it's obvious that adding parentheses will fix the problem. -- Met vriendelijke groet, // Kind regards, // Korajn salutojn, Juerd Waalboer <juerd@tnx.nl> TNX
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 657b
On Mon, 24 Jul 2017 07:15:54 -0700, juerd@tnx.nl wrote: Show quoted text
> It would be more awesome if "Unexected named argument 'foo' passed" was > supplemented with the name of the function to which it was passed. > > sub xyzzy ($x, :$foo = False) { ... } > sub bar ($y) { ... } > > xyzzy( > bar "aoeusnthaoeusnth", > :foo > ) > > If the error message includes the name 'bar', it's obvious that adding > parentheses will fix the problem.
But the error for that code does already say `in sub bar`: m: sub bar {}; bar :42foo rakudo-moar 2fb8c7: OUTPUT: «Unexpected named argument 'foo' passed␤ in sub bar at <tmp> line 1␤
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
Date: Mon, 24 Jul 2017 20:57:49 +0200
To: perl6-bugs-followup [...] perl.org
Subject: Re: [perl #131789] LTA error message: unexpected argument
Download (untitled) / with headers
text/plain 834b
Show quoted text
> On 24 Jul 2017, at 19:51, Zoffix Znet via RT <perl6-bugs-followup@perl.org> wrote: > > On Mon, 24 Jul 2017 07:15:54 -0700, juerd@tnx.nl wrote:
>> It would be more awesome if "Unexected named argument 'foo' passed" was >> supplemented with the name of the function to which it was passed. >> >> sub xyzzy ($x, :$foo = False) { ... } >> sub bar ($y) { ... } >> >> xyzzy( >> bar "aoeusnthaoeusnth", >> :foo >> ) >> >> If the error message includes the name 'bar', it's obvious that adding >> parentheses will fix the problem.
> > But the error for that code does already say `in sub bar`: > > m: sub bar {}; bar :42foo > rakudo-moar 2fb8c7: OUTPUT: «Unexpected named argument 'foo' passed␤ in sub bar at <tmp> line 1␤
Well, technically, that’s part of the backtrace, not of the message?
To: "Zoffix Znet via RT" <perl6-bugs-followup [...] perl.org>
Subject: Re: [perl #131789] LTA error message: unexpected argument
From: "Juerd Waalboer" <juerd [...] tnx.nl>
Date: Mon, 24 Jul 2017 19:55:42 +0200
Download (untitled) / with headers
text/plain 423b
Zoffix Znet via RT skribis 2017-07-24 10:51 (-0700): Show quoted text
> But the error for that code does already say `in sub bar`: > m: sub bar {}; bar :42foo > rakudo-moar 2fb8c7: OUTPUT: «Unexpected named argument 'foo' passed␤ in sub bar at <tmp> line 1␤
I was catching exceptions and printing them without gist. Sorry! -- Met vriendelijke groet, // Kind regards, // Korajn salutojn, Juerd Waalboer <juerd@tnx.nl> TNX


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