-
April 6th, 2013, 04:27 PM
#1
IONIC zip lib throwing error.
Wokring with VS 2005 and VB, I have the following code:
Code:
Try
Using zip As ZipFile = ZipFile.Read(ZipFileName)
Dim item As ZipEntry
For Each item In zip
item.Extract()
Next
End Using
Catch ex1 As BadReadException
PrintLine(BookOrgClass.intBOLog, String.Format("Bad Read: Invalid EPUB ({0})", ZipFileName))
Catch ex1 As Exception
Console.Error.WriteLine(String.Format("exception: {0}", ex1.ToString))
End Try
Now if it's a good zip, it extracts fine; if not I'm getting various exceptions - normally BadReadException.
What I don't see here is why, rather than being trapped by the catch I'm getting a program ABEND.
(( that's ABnormal END or "terminating with an exception" for you youngsters ))
Anyone see what I obviously don't and how to fix it??
//al
-
April 6th, 2013, 05:49 PM
#2
Re: IONIC zip lib throwing error.
-
April 6th, 2013, 08:08 PM
#3
Re: IONIC zip lib throwing error.
If you're going to give me more of your nonsense answers, you might want to read into that a bit further and you'll see that "Windows Compression" is a very low level and non-compatible compression. It plays well by itself but not well with anyone else.
Oddly enough, EPUB files are RAR compressed files which are zip extractable - unless the original file is trashed, in which case no-one extracts it.
And since you're going to give me answer, want to take a look at the snippet and see what's wrong? Oh, the file under discussion is a trashed file, only part of the header is there (Calibre has put together a few of these) any ideas why the catch doesn't catch it?
-
April 9th, 2013, 08:09 PM
#4
Re: IONIC zip lib throwing error.
I would suspect that it crashing in the Iconic DLL rather than returning an exception back to your code.
Always use [code][/code] tags when posting code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|