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

Already on GitHub? Sign in to your account

Error message for <non-regex> could stand to be better #69

Closed
sorear opened this Issue Oct 14, 2011 · 1 comment

Comments

Projects
None yet
1 participant
Owner

sorear commented Oct 14, 2011

15:24 < diakopter> niecza: print "{ "foo" ~~ /f(<perl>)o/ }"
15:24 <+p6eval> niecza v10-44-g82a2206: OUTPUT«␤Unhandled Exception: 
                System.InvalidCastException: Cannot cast from source type to 
                destination type.␤  at RxFrame.IncorporateChild 
                (System.String[] names, Boolean passcap, Niecza.P6any match) 
                [0x00000] in <filename unknown>:0 ␤  at RxFrame.IncorpShift 
                (Sys…

This is calling .perl, and trying to interpret the returned Str as a Match, and failing painfully.

Owner

sorear commented Oct 31, 2011

Now:

niecza> print "{ "foo" ~~ /f(<perl>)o/ }"
Submatch to be bound to perl returned a Str instead of a Cursor, violating the submatch protocol.

@sorear sorear closed this Oct 31, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment