public static void commitTransaction(this Transaction transaction, WarningSwallower failuresPreprocessor) { FailureHandlingOptions failureOptions = transaction.GetFailureHandlingOptions(); failureOptions.SetFailuresPreprocessor(failuresPreprocessor); failureOptions.SetDelayedMiniWarnings(true); failureOptions.SetClearAfterRollback(true); transaction.SetFailureHandlingOptions(failureOptions); transaction.Commit(); }