Skip to content

Commit

Permalink
Make X::Comp::BeginTime a bit more resilient
Browse files Browse the repository at this point in the history
Against compilation errors early in the setting compilation
  • Loading branch information
lizmat committed Apr 5, 2024
1 parent 037fab6 commit 502a6a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core.c/Exception.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -981,10 +981,10 @@ my class X::Comp::BeginTime does X::Comp {
has $.exception;

method message() {
$!exception ~~ X::MOP
?? $!exception.message
!! "An exception {$!exception.^name} occurred while $!use-case"
~ (try { ": " ~ $!exception.message } // "")
(try $!exception ~~ X::MOP)
?? $!exception.message
!! "An exception {$!exception.^name} occurred while $!use-case"
~ (try { ":\n" ~ $!exception.message } // "")
}

multi method gist(::?CLASS:D: :$sorry = True) {
Expand Down

0 comments on commit 502a6a1

Please sign in to comment.