Class ModelValueException
- Namespace
- Dynamicweb.CoreUI.Data
- Assembly
- Dynamicweb.CoreUI.dll
Thrown by ModelBuilder when a posted value cannot be converted to the type of the model property it targets.
public sealed class ModelValueException : Exception, ISerializable
- Inheritance
-
ModelValueException
- Implements
- Inherited Members
Constructors
ModelValueException()
Initializes a new instance of the ModelValueException class.
public ModelValueException()
ModelValueException(string)
Initializes a new instance of the ModelValueException class with a message.
public ModelValueException(string message)
Parameters
messagestring
ModelValueException(string, Exception)
Initializes a new instance of the ModelValueException class with a message and an inner exception.
public ModelValueException(string message, Exception innerException)
Parameters
ModelValueException(string, string, Exception?)
Initializes a new instance of the ModelValueException class for a specific model property.
public ModelValueException(string propertyName, string message, Exception? innerException)
Parameters
propertyNamestringThe name of the property that could not be set, in camelCase as it appears on the wire.
messagestringA message describing why the value is not valid.
innerExceptionExceptionThe conversion error, if any.
Properties
PropertyName
Gets the name of the property that could not be set, in camelCase as it appears on the wire.
public string? PropertyName { get; }