Stops serialization or package creation when a deck has structured validation errors. More...
Public Member Functions | |
| AnkiValidationException (AnkiValidationResult validationResult) | |
| Initializes an exception for a completed failed validation pass. | |
Properties | |
| AnkiValidationResult | ValidationResult [get] |
| Gets the complete diagnostic snapshot associated with the failed operation. | |
Stops serialization or package creation when a deck has structured validation errors.
Catch this exception when user-authored content may be incomplete, then inspect ValidationResult and branch on stable diagnostic codes such as ANKI020. The human-readable Exception.Message is intended for logs and only summarizes the number of errors; it is not a parsing contract.
The validation result is a fixed snapshot. Correct the mutable deck graph and invoke the operation again to obtain a new result; changing the deck does not rewrite the diagnostics retained by an existing exception.
Definition at line 28 of file AnkiValidationException.cs.
|
inline |
Initializes an exception for a completed failed validation pass.
| validationResult | The immutable diagnostic snapshot that prevented the operation. |
| ArgumentNullException | validationResult is null. |
Definition at line 33 of file AnkiValidationException.cs.
|
get |
Gets the complete diagnostic snapshot associated with the failed operation.
The same validation-result instance supplied to the constructor.
Definition at line 41 of file AnkiValidationException.cs.