eval { my $obj= ObjClass::Obj->new(); $obj->id( $id ); $obj->load_via_id() ; $res= $obj->id ; Exception::ActivatedAccount->throw unless $obj->activated_account; }; if( my $e = Exception::Class->caught ) { # handle exception and decide about logging here }