Class SoValidationException
ValidationException is thrown by the Save() methods if validation fails on an entity. Contains a string map that describes all fields and their errors. This is returned in the error object to the caller, so that they can highlight missing/bad fields to the user, with explanations.
Implements
System.Runtime.Serialization.ISerializable
System.Runtime.InteropServices._Exception
Inherited Members
System.Exception.GetBaseException()
System.Exception.ToString()
System.Exception.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
System.Exception.GetType()
System.Exception.Data
System.Exception.InnerException
System.Exception.TargetSite
System.Exception.StackTrace
System.Exception.HelpLink
System.Exception.Source
System.Exception.HResult
System.Exception.SerializeObjectState
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.MemberwiseClone()
Namespace: SuperOffice.Exceptions
Assembly: SoCore.dll
Syntax
public class SoValidationException : SoException, ISerializable, _Exception
Constructors
SoValidationException(StringDictionary)
Exception with many messages.
Declaration
public SoValidationException(StringDictionary messages)
Parameters
Type | Name | Description |
---|---|---|
StringDictionary | messages |
Properties
Messages
The message collection.
Declaration
public StringDictionary Messages { get; }
Property Value
Type | Description |
---|---|
StringDictionary |
Methods
GetMessageFor(String)
Returns any message for a given field name, or blank if no message defined.
Declaration
public string GetMessageFor(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
Returns
Type | Description |
---|---|
System.String | Error message, or "" blank string. |
Implements
System.Runtime.Serialization.ISerializable
System.Runtime.InteropServices._Exception
Extension Methods
EnumUtil.MapEnums<From, To>(From)