Skip to content

Commit

Permalink
Re-fix exception handling on role parameterization
Browse files Browse the repository at this point in the history
Seems like `nqp::getmessage` doesn't try to stringify the payload. Thus,
use both with payload taking preference of the message.
  • Loading branch information
vrurg committed Dec 21, 2019
1 parent 755c803 commit 0d2eb1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Perl6/Metamodel/ParametricRoleHOW.nqp
Expand Up @@ -168,7 +168,7 @@ class Perl6::Metamodel::ParametricRoleHOW
}
if $error {
nqp::die("Could not instantiate role '" ~ self.name($obj)
~ "':\n" ~ nqp::getmessage($error))
~ "':\n" ~ (nqp::getpayload($error) || nqp::getmessage($error)))
}

# Use it to build a concrete role.
Expand Down

0 comments on commit 0d2eb1c

Please sign in to comment.