Partilhar via


Failure Class

The Failure object contains much of the same information as an exception but is not derived from Exception and is now throwable.

Commands that operate on a collection of items, each of which may succeed or fail independently of the others will return an array of Failure objects representing the items that had trouble.

The Failure object also contains fields that describe the context in which the error occurred. A smart client may use these to decide about how to handle the error. Irrelevant information remains null and will not be sent as part of the SOAP reply.

Inheritance Hierarchy

System.Object
  Microsoft.TeamFoundation.VersionControl.Server.Failure

Namespace:  Microsoft.TeamFoundation.VersionControl.Server
Assembly:  Microsoft.TeamFoundation.VersionControl.Server (in Microsoft.TeamFoundation.VersionControl.Server.dll)

Syntax

'Declaration
<RequiredClientServiceAttribute("VersionControlServer")> _
Public Class Failure _
    Implements ICacheable
[RequiredClientServiceAttribute("VersionControlServer")]
public class Failure : ICacheable
[RequiredClientServiceAttribute(L"VersionControlServer")]
public ref class Failure : ICacheable
[<RequiredClientServiceAttribute("VersionControlServer")>]
type Failure =  
    class 
        interface ICacheable 
    end
public class Failure implements ICacheable

The Failure type exposes the following members.

Constructors

  Name Description
Public method Failure Creates an empty failure. Used for marshaling.

Top

Properties

  Name Description
Public property Code Short unique string that describes the error. Usually the classname of the exception. Synonymous with SoapException.Code
Public property ComputerName Error context information.
Public property IdentityName Error context information.
Public property ItemId The item's ID. Used to retrieve file contents
Public property LocalItem Error context information.
Public property Message Human readable message that describes the error. Synonymous with SoapException.Message
Public property RequestType Type of change requested in the operation. Only set when PendChanges() is called
Public property ResourceName Error context information.
Public property ServerItem Error context information.
Public property Severity Indicates the failure "type"
Public property Warnings Warning elements
Public property WorkspaceName Error context information.
Public property WorkspaceOwner Error context information.

Top

Methods

  Name Description
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetCachedSize
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.TeamFoundation.VersionControl.Server Namespace