Function swc_core::base::try_with_handler

pub fn try_with_handler<F, Ret>(
    cm: Arc<SourceMap>,
    config: HandlerOpts,
    op: F
) -> Result<Ret, Error>
where F: FnOnce(&Handler) -> Result<Ret, Error>,
Available on crate feature __base only.
Expand description

Try operation with a Handler and prints the errors as a String wrapped by Err.