Class InvalidPropertyValueException
Exception throw by Property
Implements
Inherited Members
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public class InvalidPropertyValueException : EPiServerException, IPropertyException
Remarks
Will translate error message to current language, default message is: "{actualValue}" is not a valid value for "{name}".
Invalid
Constructors
InvalidPropertyValueException()
Initializes a new instance with a specified name and a actual value
Declaration
public InvalidPropertyValueException()
InvalidPropertyValueException(SerializationInfo, StreamingContext)
Initializes a new instance of the Invalid
Declaration
protected InvalidPropertyValueException(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System. |
info | The object that holds the serialized object data. |
System. |
context | The contextual information about the source or destination. |
InvalidPropertyValueException(String)
Initializes a new instance with a specified name and a actual value
Declaration
public InvalidPropertyValueException(string message)
Parameters
Type | Name | Description |
---|---|---|
System. |
message | Source property name/type of exception |
InvalidPropertyValueException(String, Exception)
Initializes the new instance of Invalid
Declaration
public InvalidPropertyValueException(string message, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
System. |
message | The error message that explains the reason for the exception. |
System. |
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. |
InvalidPropertyValueException(String, String)
Initializes a new instance with a specified name and a actual value
Declaration
public InvalidPropertyValueException(string name, string actualValue)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | Source property name/type of exception |
System. |
actualValue | The value that was assigned |
InvalidPropertyValueException(String, String, Exception)
Initializes a new instance with a specified name, actual value and inner exception that was the cause of the exception.
Declaration
public InvalidPropertyValueException(string name, string actualValue, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | Source property name/type of exception |
System. |
actualValue | The value that was assigned |
System. |
innerException | The inner exception that was the cause of the exception |
InvalidPropertyValueException(String, String, String, String[])
Initializes a new instance with a specified name and a actual value
Declaration
public InvalidPropertyValueException(string actualValue, string message, string languageKey, params string[] list)
Parameters
Type | Name | Description |
---|---|---|
System. |
actualValue | The value that was assigned |
System. |
message | The error message that explains the reason for the exception. |
System. |
languageKey | Language key passed to Localization |
System. |
list | Parameter list to substitute values in error text using System. |
Properties
ActualValue
Gets a string representation of the value that caused the exception.
Declaration
public string ActualValue { get; set; }
Property Value
Type | Description |
---|---|
System. |
Value that caused the exception. |
Methods
ChangeDisplayName(String)
Tries to set the error message to a translated exception message.
Declaration
public void ChangeDisplayName(string name)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | The name of the property. |