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 | |
---|---|---|
Failure | Creates an empty failure. Used for marshaling. |
Top
Properties
Name | Description | |
---|---|---|
Code | Short unique string that describes the error. Usually the classname of the exception. Synonymous with SoapException.Code | |
ComputerName | Error context information. | |
IdentityName | Error context information. | |
ItemId | The item's ID. Used to retrieve file contents | |
LocalItem | Error context information. | |
Message | Human readable message that describes the error. Synonymous with SoapException.Message | |
RequestType | Type of change requested in the operation. Only set when PendChanges() is called | |
ResourceName | Error context information. | |
ServerItem | Error context information. | |
Severity | Indicates the failure "type" | |
Warnings | Warning elements | |
WorkspaceName | Error context information. | |
WorkspaceOwner | Error context information. |
Top
Methods
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetCachedSize | ||
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
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.