Indicates that an untrusted package was deliberately rejected by an AnkiIO archive-safety rule. More...
Public Member Functions | |
| AnkiPackageSecurityException (string message) | |
| Initializes a package-security rejection with diagnostic context. | |
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.
|
inline |
Initializes a package-security rejection with diagnostic context.
| message | A 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.