Skip to content

Commit

Permalink
Make method name optional in X::Invalid::ComputedValue
Browse files Browse the repository at this point in the history
Sometimes we don't know what the user-facing method was used.
  • Loading branch information
zoffixznet committed May 8, 2017
1 parent 973338a commit 0bd39de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/Exception.pm
Expand Up @@ -1280,7 +1280,8 @@ my class X::Invalid::ComputedValue is Exception {
has $.value;
has $.reason;
method message {
"$.name on $.method computed to $.value, which cannot be used"
"$.name {"on $.method " if $.method}computed to $.value,"
~ " which cannot be used"
~ (" because $.reason" if $.reason);
}
}
Expand Down

0 comments on commit 0bd39de

Please sign in to comment.