Class SchemaViolationException
Exception thrown when there is an error validating a title configuration against the schema.
Implements
Inherited Members
Namespace: CrashCABN.JsonSchema
Assembly: CrashCABN.JsonSchema.dll
Syntax
public class SchemaViolationException : ConfigurationException, ISerializable
Constructors
View SourceSchemaViolationException()
Initializes a new instance of the SchemaViolationException class.
Declaration
public SchemaViolationException()
SchemaViolationException(string)
Initializes a new instance of the SchemaViolationException class.
Declaration
public SchemaViolationException(string message)
Parameters
Type | Name | Description |
---|---|---|
string | message | The message that describes the error. |
SchemaViolationException(string, JToken, IEnumerable<string>)
Initializes a new instance of the SchemaViolationException class.
Declaration
public SchemaViolationException(string message, JToken jsonToken, IEnumerable<string> violationMessages)
Parameters
Type | Name | Description |
---|---|---|
string | message | The message that describes the error. |
JToken | jsonToken | The json token that violated the schema. |
IEnumerable<string> | violationMessages | The details of the schema violations. |
SchemaViolationException(string, Exception)
Initializes a new instance of the SchemaViolationException class.
Declaration
public SchemaViolationException(string message, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
string | message | The message that describes the error. |
Exception | innerException | The exception that is the cause of the current exception, or a null reference if no inner exception is specified. |
Properties
View SourceViolations
Gets the list of schema violations if available.
Declaration
public IEnumerable<string>? Violations { get; }
Property Value
Type | Description |
---|---|
IEnumerable<string> |