Error Event

Information about non-fatal errors.

Syntax

public event OnErrorHandler OnError;

public delegate void OnErrorHandler(object sender, SevenzipErrorEventArgs e);

public class SevenzipErrorEventArgs : EventArgs {
  public string Description { get; }
  public int ErrorCode { get; }
  public int Index { get; }
  public string Filename { get; }
  public bool Ignore { get; set; }
}
Public Event OnError As OnErrorHandler

Public Delegate Sub OnErrorHandler(sender As Object, e As SevenzipErrorEventArgs)

Public Class SevenzipErrorEventArgs Inherits EventArgs
  Public ReadOnly Property Description As String
  Public ReadOnly Property ErrorCode As Integer
  Public ReadOnly Property Index As Integer
  Public ReadOnly Property Filename As String
  Public Property Ignore As Boolean
End Class

Remarks

The Error event is fired when non-fatal errors occur during compression or decompression. Note that if this event is fired during decompression this may indicate that the archive is corrupt.

By default these errors will cause the component to fail with an exception. The exception may be overridden by setting Ignore to true. This will cause the error to be ignored, the file will be skipped if necessary, and the component will continue operation.

ErrorCode will correspond to one of the following errors:

1Bad or missing CRC-32 checksum.
2Failed to set creation date of a file.
111Can't open file for read (skipping).

Description contains a textual description of the error. Index and Filename contain the array index (where appropriate) and filename of the file being processed at the time of the error.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks ZIP 2020 .NET Edition - Version 20.0 [Build 8300]