# OdfEncryptedPackageException

Thrown when an encrypted ODF package cannot be processed safely.

Class 

`OfficeIMO.OpenDocument`

**Namespace**

`OfficeIMO.OpenDocument`

**Assembly**

`OfficeIMO.OpenDocument`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[OdfEncryptedPackageException.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Packaging/OdfEncryptedPackageException.cs#L6)

**Base**

`NotSupportedException`

**Implements**

`ISerializable`

**Modifiers**

sealed

Thrown when an encrypted ODF package cannot be processed safely.

## Inheritance

- NotSupportedException
- OdfEncryptedPackageException

## Guides & Samples

Authored walkthroughs and practical samples linked to this API.

- [Create and Read ODT, ODS and ODP Files](/docs/open-document/create-read/) Guide
  
  Create OpenDocument text, spreadsheet and presentation files, read their content, edit them in place, and open password-protected files.

Filter members 

Show inherited

## Constructors

OdfEncryptedPackageException 2 overloads

`public OdfEncryptedPackageException(string message)` [#](#constructor-ctor-string)

[OdfEncryptedPackageException.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Packaging/OdfEncryptedPackageException.cs#L6)

Creates the exception.

Parameters

**message string required**

`public OdfEncryptedPackageException(string message, OdfEncryptionFailureReason reason, string? entryPath = null, Exception? innerException = null)` [#](#constructor-ctor-string-officeimo-opendocument-odfencryptionfailurereason-string-exception)

[OdfEncryptedPackageException.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Packaging/OdfEncryptedPackageException.cs#L11)

Creates a classified encrypted-package exception.

Parameters

**message string required**

**reason OfficeIMO.OpenDocument.OdfEncryptionFailureReason required**

**entryPath string? = null optional**

**innerException System.Exception? = null optional**

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual Exception GetBaseException()` [#](#method-getbaseexception)

Inherited from Exception

Returns

`Exception`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public virtual void GetObjectData(SerializationInfo info, StreamingContext context)` [#](#method-getobjectdata-serializationinfo-streamingcontext)

Inherited from Exception

`Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")` `EditorBrowsable(1)`

Parameters

**info SerializationInfo required**

**context StreamingContext required**

`public Type GetType()` [#](#method-gettype)

Inherited from Exception

Returns

`Type`

`public override string ToString()` [#](#method-tostring)

Inherited from Exception

Returns

`string`

## Properties

`public OdfEncryptionFailureReason Reason { get; }` [#](#property-reason)

[OdfEncryptedPackageException.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Packaging/OdfEncryptedPackageException.cs#L17)

Reason the encrypted package could not be processed.

`public string? EntryPath { get; }` [#](#property-entrypath)

[OdfEncryptedPackageException.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Packaging/OdfEncryptedPackageException.cs#L20)

Encrypted package entry associated with the failure, when known.

## Inherited Properties

`public MethodBase? TargetSite { get; }` [#](#property-targetsite)

Inherited from Exception

`public virtual string Message { get; }` [#](#property-message)

Inherited from Exception

`public virtual IDictionary Data { get; }` [#](#property-data)

Inherited from Exception

`public Exception? InnerException { get; }` [#](#property-innerexception)

Inherited from Exception

`public virtual string? HelpLink { get; set; }` [#](#property-helplink)

Inherited from Exception

`public virtual string? Source { get; set; }` [#](#property-source)

Inherited from Exception

`public int HResult { get; set; }` [#](#property-hresult)

Inherited from Exception

`public virtual string? StackTrace { get; }` [#](#property-stacktrace)

Inherited from Exception

<!-- PowerForge markdown artifact sha256:E3E8E93A057EF0E89476603C0D5937D26F7D26411A05DBF495DDD0CF659F800A -->
