tryRunOrWebpackError = (fn, hook) => {
	let r;
	try {
		r = fn();
	} catch (err) {
		if (err instanceof WebpackError) {
			throw err;
		}
		throw new HookWebpackError(/** @type {Error} */ (err), hook);
	}
	return r;
}
@template T
@param {() => T} fn function which will be wrapping in try catch
@param {string} hook name of hook
@returns {T} the result