Skip to content

Commit 0853325

Browse files
committed
Test covering RT #125620.
1 parent 03d13c1 commit 0853325

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

S32-exceptions/misc.t

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use Test;
33
use lib "t/spec/packages";
44
use Test::Util;
55

6-
plan 326;
6+
plan 328;
77

88
throws-like '42 +', X::AdHoc, "missing rhs of infix", message => rx/term/;
99

@@ -702,4 +702,13 @@ throws-like 'my package P { }; sub foo(P of Int) { }', X::NotParametric;
702702
throws-like 'my module M { }; sub foo(M of Int) { }', X::NotParametric;
703703
throws-like 'my class C { }; sub foo(C of Int)', X::NotParametric;
704704

705+
# RT #125620
706+
{
707+
my class CustomException is Exception {}
708+
try die CustomException.new;
709+
lives-ok { $!.gist }, 'Can gist an exception with no message method';
710+
ok $!.gist ~~ /CustomException/,
711+
'The gist of exception with no message method mentions the type';
712+
}
713+
705714
# vim: ft=perl6

0 commit comments

Comments
 (0)