Method SetExceptionSetException(Exception)Sets the exception for the method or activity. Declaration public virtual void SetException(Exception exception) Parameters Type Name Description Exception exception An Exception. ImplementsICustomLogRecordBuilder.SetException(Exception)