Error Event
Information about non-fatal errors.
Syntax
ANSI (Cross Platform) virtual int FireError(Bzip2ErrorEventParams *e);
typedef struct {
const char *Description;
int ErrorCode;
int Index;
const char *Filename;
int Ignore; int reserved; } Bzip2ErrorEventParams; Unicode (Windows) virtual INT FireError(Bzip2ErrorEventParams *e);
typedef struct {
LPCWSTR Description;
INT ErrorCode;
INT Index;
LPCWSTR Filename;
BOOL Ignore; INT reserved; } Bzip2ErrorEventParams;
- (void)onError:(NSString*)description :(int)errorCode :(int)index :(NSString*)filename :(int*)ignore;
#define EID_BZIP2_ERROR 3 virtual INT IPWORKSZIP_CALL FireError(LPSTR &lpszDescription, INT &iErrorCode, INT &iIndex, LPSTR &lpszFilename, BOOL &bIgnore);
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 class will continue operation.
ErrorCode will correspond to one of the following errors:
1 | Bad or missing CRC-32 checksum. |
2 | Failed to set creation date of a file. |
111 | Can'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.