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

+"foo" not caught by try ? #3565

Closed
p6rt opened this issue Oct 25, 2014 · 5 comments
Closed

+"foo" not caught by try ? #3565

p6rt opened this issue Oct 25, 2014 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Oct 25, 2014

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

Searchable as RT123053$

@p6rt
Copy link
Author

p6rt commented Oct 25, 2014

From @lizmat

[16​:00​:04] <lizmat> m​: say try die # does not actually die
[16​:00​:05] <+camelia> rakudo-moar 315ec6​: OUTPUT«Nil␤»
[16​:00​:13] <lizmat> m​: say try +"foo" # this does, why ?
[16​:00​:14] <+camelia> rakudo-moar 315ec6​: OUTPUT«Cannot convert string to number​: base-10 number must begin with valid digits or '.' in '⏏foo' (indicated by ⏏)␤ in method gist at src/gen/m-CORE.setting​:13672␤ in sub say at src/gen/m-CORE.setting​:15862␤ in block <unit> at /tmp/HzF9JlwvI6​:1␤␤»
[16​:01​:18] <lizmat> rakudobug ?
[16​:03​:30] xenoterracide_ (~xenoterra@​user-0ccsp49.cable.mindspring.com) joined the channel.
[16​:04​:00] <masak> I'd say so.
[16​:04​:04] <masak> please submit.

@p6rt
Copy link
Author

p6rt commented Apr 8, 2015

From @jnthn

On Sat Oct 25 07​:08​:44 2014, elizabeth wrote​:

[16​:00​:04] <lizmat> m​: say try die # does not actually die
[16​:00​:05] <+camelia> rakudo-moar 315ec6​: OUTPUT«Nil␤»
[16​:00​:13] <lizmat> m​: say try +"foo" # this does, why ?
[16​:00​:14] <+camelia> rakudo-moar 315ec6​: OUTPUT«Cannot convert
string to number​: base-10 number must begin with valid digits or '.'
in '⏏foo' (indicated by ⏏)␤ in method gist at src/gen/m-
CORE.setting​:13672␤ in sub say at src/gen/m-CORE.setting​:15862␤ in
block <unit> at /tmp/HzF9JlwvI6​:1␤␤»
[16​:01​:18] <lizmat> rakudobug ?
[16​:03​:30] xenoterracide_ (~xenoterra@​user-
0ccsp49.cable.mindspring.com) joined the channel.
[16​:04​:00] <masak> I'd say so.
[16​:04​:04] <masak> please submit.

Had a few attempts at fixing this. None of them worked; discussion about why on #perl6. In the meantime, there are tests added in S04-statements/try.t.

@p6rt
Copy link
Author

p6rt commented Apr 8, 2015

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

@p6rt
Copy link
Author

p6rt commented Apr 16, 2015

From @jnthn

On Sat Oct 25 07​:08​:44 2014, elizabeth wrote​:

[16​:00​:04] <lizmat> m​: say try die # does not actually die
[16​:00​:05] <+camelia> rakudo-moar 315ec6​: OUTPUT«Nil␤»
[16​:00​:13] <lizmat> m​: say try +"foo" # this does, why ?
[16​:00​:14] <+camelia> rakudo-moar 315ec6​: OUTPUT«Cannot convert
string to number​: base-10 number must begin with valid digits or '.'
in '⏏foo' (indicated by ⏏)␤ in method gist at src/gen/m-
CORE.setting​:13672␤ in sub say at src/gen/m-CORE.setting​:15862␤ in
block <unit> at /tmp/HzF9JlwvI6​:1␤␤»
[16​:01​:18] <lizmat> rakudobug ?
[16​:03​:30] xenoterracide_ (~xenoterra@​user-
0ccsp49.cable.mindspring.com) joined the channel.
[16​:04​:00] <masak> I'd say so.
[16​:04​:04] <masak> please submit.

Now 'use fatal' applies in try blocks, fixing this issue. It's tested in S04-statements/try.t.

@p6rt p6rt closed this as completed Apr 16, 2015
@p6rt
Copy link
Author

p6rt commented Apr 16, 2015

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

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