Error Suppression / Swallower

Hi,

I`ve been reading Revit API and thebuildingcoder for failure suppression but all the topics / examples they have is about suppressing warning.

Is there a way to suppress the error message below and just rollback if the transaction is not permitted.

A

B

-biboy

Hi @blsalvio, you can use the SetFailureHandlingOptions() method of the transaction object to handle the failure option automatically.

hi @stillgotme

I already studied that API call up to FailuresAccessor, but all I can do is suppress warnings, because there is a DeleteWarning in the Revit API while there is none for errors. I am hoping that there are other methods like catching events.

-biboy

you can do a rollback when an error is called, without showing the error message box, using that method.

1 Like

i dont know how to catch when an error is called without the message box showing. maybe you can show a sample code.