isa_ok(
$error, 'My::Exception',
'got exception object (immutable class)'
- );
+ ) or diag $error;
is(
$error->message, 'Attribute (test1) is required',
'got the right message (immutable class)'
};
my $error = $@;
- isa_ok( $error, 'My::Exception', 'got exception object (mutable class)' );
+ isa_ok(
+ $error, 'My::Exception',
+ 'got exception object (mutable class)'
+ ) or diag $error;
is(
$error->message, 'Attribute (test1) is required',
'got the right message (mutable class)'