Class ObjectNotFoundException
Represents error of failed object finding.
Inheritance
Implements
Inherited Members
Namespace: Relativity.Testing.Framework
Assembly: Relativity.Testing.Framework.dll
Syntax
[Serializable]
public class ObjectNotFoundException : Exception, ISerializable, _ExceptionConstructors
| Improve this Doc View SourceObjectNotFoundException()
Initializes a new instance of the ObjectNotFoundException class.
Declaration
public ObjectNotFoundException()ObjectNotFoundException(SerializationInfo, StreamingContext)
Initializes a new instance of the ObjectNotFoundException class.
Declaration
protected ObjectNotFoundException(SerializationInfo info, StreamingContext context)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Runtime.Serialization.SerializationInfo | info | The System.Runtime.Serialization.SerializationInfo that holds the serialized object data about the exception being thrown. | 
| System.Runtime.Serialization.StreamingContext | context | The System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination. | 
ObjectNotFoundException(String)
Initializes a new instance of the ObjectNotFoundException class.
Declaration
public ObjectNotFoundException(string message)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | message | The message that describes the error. | 
ObjectNotFoundException(String, Exception)
Initializes a new instance of the ObjectNotFoundException class.
Declaration
public ObjectNotFoundException(string message, Exception innerException)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | message | The error message that explains the reason for the exception. | 
| System.Exception | innerException | The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. | 
Methods
| Improve this Doc View SourceCreateForNotFoundById<T>(Int32)
Creates ObjectNotFoundException instance for case when entity is not found by ID.
Declaration
public static ObjectNotFoundException CreateForNotFoundById<T>(int id)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | id | The entity ID. | 
Returns
| Type | Description | 
|---|---|
| ObjectNotFoundException | An instance of ObjectNotFoundException with built error message. | 
Type Parameters
| Name | Description | 
|---|---|
| T | The type of entity. | 
CreateForNotFoundByName<T>(String)
Creates ObjectNotFoundException instance for case when entity is not found by name.
Declaration
public static ObjectNotFoundException CreateForNotFoundByName<T>(string name)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | name | The entity name. | 
Returns
| Type | Description | 
|---|---|
| ObjectNotFoundException | An instance of ObjectNotFoundException with built error message. | 
Type Parameters
| Name | Description | 
|---|---|
| T | The type of entity. |