Class ObjectCreationException
The exception that is thrown when AutoFixture is unable to create an object.
Inheritance
Implements
Inherited Members
Namespace: AutoFixture
Assembly: AutoFixture.dll
Syntax
[Serializable]
public class ObjectCreationException : Exception, _Exception, ISerializable
Constructors
| Improve this Doc View SourceObjectCreationException()
Initializes a new instance of the ObjectCreationException class with a default System.Exception.Message.
Declaration
public ObjectCreationException()
ObjectCreationException(SerializationInfo, StreamingContext)
Initializes a new instance of the ObjectCreationException class with serialized data.
Declaration
protected ObjectCreationException(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The object that holds the serialized object data. |
System.Runtime.Serialization.StreamingContext | context | The contextual information about the source or destination. |
ObjectCreationException(String)
Initializes a new instance of the ObjectCreationException class with a custom System.Exception.Message.
Declaration
public ObjectCreationException(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The error message that explains the reason for the exception. |
ObjectCreationException(String, Exception)
Initializes a new instance of the ObjectCreationException class with a custom System.Exception.Message and System.Exception.InnerException.
Declaration
public ObjectCreationException(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. |