('example');
}
catch ($e) {
$exception = $e;
}
if ($exception) {
isnt $exception, undef, 'unspecified catches class';
isa_ok $exception, 'Sample::Exception';
->throw('refined');
}
catch ( Sample::Exception $e) {
$exception = $e;
}
isnt $exception, undef, 'class catches class';
if ($exception) {
isa_ok $exception, 'Sampl
e::Exception::Refined->throw('refined')
}
catch ($e) {
$exception = $e;
}
isnt $exception, undef, 'unspecified catches subclass';
if ($exception) {
isa_ok $exceptio
er_continued, 'outer_continued should never be reached'; # >fails with original Nice::Try
isnt $outer_caught, undef, 'caught inner exception in outer catch'; # >fails with original Nice::Try