eval { # Something that can die ... }; Your::CustomMod::launch_error( $@ ) if ( $@ );