Method SetExceptionSetException(Exception)Assigns an Exception to the record. Declaration void SetException(Exception exception) Parameters Type Name Description Exception exception The Exception.