AnkiIO 1.0.2
Build, validate, import, and export Anki-compatible decks from .NET
Loading...
Searching...
No Matches
AnkiIO.AnkiPackageSecurityException Class Referencesealed

Indicates that an untrusted package was deliberately rejected by an AnkiIO archive-safety rule. More...

Inheritance diagram for AnkiIO.AnkiPackageSecurityException:

Public Member Functions

 AnkiPackageSecurityException (string message)
 Initializes a package-security rejection with diagnostic context.

Detailed Description

Indicates that an untrusted package was deliberately rejected by an AnkiIO archive-safety rule.

Catch this type when a caller needs to distinguish a configured security rejection from ordinary malformed data or an environmental I/O failure. Examples include excessive entry count or size, a suspicious compression ratio, duplicate or unsafe ZIP names, symbolic-link entries, and unsafe media-map names. The message is diagnostic text, not a stable value for program logic.

Other invalid packages can instead throw InvalidDataException, System.Text.Json.JsonException, Microsoft.Data.Sqlite.SqliteException, NotSupportedException, or another IOException. This exception therefore means “rejected by a safety policy,” not “every possible malicious input has been detected.”

Definition at line 16 of file AnkiPackageSecurityException.cs.

Constructor & Destructor Documentation

◆ AnkiPackageSecurityException()

AnkiIO.AnkiPackageSecurityException.AnkiPackageSecurityException ( string message)
inline

Initializes a package-security rejection with diagnostic context.

Parameters
messageA non-localized explanation of the limit or structural rule that rejected the package.

Use the exception type for control flow; do not parse message .

Definition at line 21 of file AnkiPackageSecurityException.cs.


The documentation for this class was generated from the following file: