// an exception

        if (!finalized)
        {
            try { SimpleFinalizer(ref result); } catch { }
            try { ex = EditFinalizer(ex, ref result); } catch { }
        }

        if (allVoid)
        {
            // alternative 1: all finalizers are returning void
            throw;
        }
        else
        {
            // alternative 2: at least one non-void finalizer
            if (ex is not null) throw ex;
        }

        return result;
    }
}

// given