# New Ticket Created by Moritz Lenz # Please include the string: [perl #111986] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=111986 >
22:29 < moritz> nom: class A is Exception { }; my $x = fail A.new; say $x.exception.WHAT 22:29 <+p6eval> rakudo a4c78f: OUTPUT«X::AdHoc()» Should be A(), not X::AdHoc. That's because somewhere along the way, fail() stringifies its arguments, and then the exception is wrapped in X::AdHoc, because the stringified thing isn't of type Exception anymore. Note that with "use fatal" in effect, it works as designed: 22:32 < moritz> nom: class A is Exception { }; use fatal; try fail A.new; say $!.WHAT 22:32 <+p6eval> rakudo 008dd4: OUTPUT«A()»