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

Bogus unthrown exception when using 'index' on non-substring in Rakudo #1065

Closed
p6rt opened this issue Jun 16, 2009 · 4 comments
Closed

Bogus unthrown exception when using 'index' on non-substring in Rakudo #1065

p6rt opened this issue Jun 16, 2009 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jun 16, 2009

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

Searchable as RT66624$

@p6rt
Copy link
Author

p6rt commented Jun 16, 2009

From @masak

<szabgab> rakudo​: say index "abcbd", "x"
<p6eval> rakudo ba09b2​: OUTPUT«Attempt to index from negative position␤␤»
<szabgab> rakudo​: index "abcbd", "x"
<p6eval> rakudo ba09b2​: ( no output )
<moritz_> it returns a failure object
<moritz_> which throws an exception if used
<Matt-W> ooooh
<Matt-W> and when .Str is called on it, it tells you about the failure?
<masak> rakudo​: 1+index("abcbd", "x")
<p6eval> rakudo ba09b2​: OUTPUT«Attempt to index from negative position␤»
<moritz_> but that error message is bogus nonetheless
<Matt-W> it is a strange error message to be produced in that situation
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Jun 30, 2009

From @pmichaud

Rakudo 95a2c4f now gives a more useful error message when returning the
failure for not finding a given substring​:

  pmichaud@​orange​:~/rakudo$ ./perl6
  > say index "abcd", "x"
  Substring 'x' not found in 'abcd'

Closing ticket, thanks!

Pm

1 similar comment
@p6rt
Copy link
Author

p6rt commented Jun 30, 2009

From @pmichaud

Rakudo 95a2c4f now gives a more useful error message when returning the
failure for not finding a given substring​:

  pmichaud@​orange​:~/rakudo$ ./perl6
  > say index "abcd", "x"
  Substring 'x' not found in 'abcd'

Closing ticket, thanks!

Pm

@p6rt
Copy link
Author

p6rt commented Jun 30, 2009

@pmichaud - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed Jun 30, 2009
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant