Class
ArchivePasswordException
OfficeIMO.Archives
An encrypted archive member could not be opened: no password was supplied, or the supplied password does not open it.
Inheritance
- IOException
- ArchivePasswordException
Remarks
Derives from IOException, like ArchiveCorruptionException. Traditional ZipCrypto carries only a one-byte password check, so a wrong password can also surface after decoding, as a checksum mismatch; that case is reported here too, because it cannot be told apart from a damaged member.
Constructors
ArchivePasswordException 2 overloads
public ArchivePasswordException(string entryName, bool passwordSupplied, string message) #Creates the exception for entryName.
Parameters
- entryName string
- The member name as stored in the archive.
- passwordSupplied bool
- Whether a password was supplied.
- message string
- The error message.
public ArchivePasswordException(string entryName, bool passwordSupplied, string message, Exception? innerException) #Creates the exception with the error that caused it.
Parameters
- entryName string
- The member name as stored in the archive.
- passwordSupplied bool
- Whether a password was supplied.
- message string
- The error message.
- innerException System.Exception?
- The error that caused this one, or null.
Inherited Methods
public virtual void GetObjectData(SerializationInfo info, StreamingContext context) #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
- context StreamingContext
Properties
Inherited Properties
public MethodBase? TargetSite { get; } #Inherited from Exception
public virtual string Message { get; } #Inherited from Exception
public virtual IDictionary Data { get; } #Inherited from Exception
public Exception? InnerException { get; } #Inherited from Exception
public virtual string? HelpLink { get; set; } #Inherited from Exception
public virtual string? Source { get; set; } #Inherited from Exception
public int HResult { get; set; } #Inherited from Exception
public virtual string? StackTrace { get; } #Inherited from Exception