#1 2013-12-18 13:58:48

Eric
Member
Registered: 2012-11-26
Posts: 129
Website

SynZip Check method shows error dialogs

In case of errors, SynZip has a Check function, which displays errors with

   

MessageError(IntToStr(aCode),'SynZip');

However that can be called from the HTTP worker threads (among others), which may be running in a service, so there may be no one to see the error. It should probably be something like

 

raise Exception.CreateFmt('SynZip %d', [aCode]);

So that an exception is appropriately triggered, and the code calling SynZip can react appropriately.

Even for interactive debugging it can get problematic if you have a few hundred of such errors fired from a tight loop, it'll overwhelm your screen with as many error dialogs, which just can make Windows crawl before you get a chance to terminate the app (happened to me)

Offline

#2 2013-12-18 17:32:53

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,706
Website

Re: SynZip Check method shows error dialogs

You are right.

Any zip-related error will now raise a ESynZipException.
See http://synopse.info/fossil/info/f0e0efb8b5

Offline

#3 2013-12-19 12:33:12

Eric
Member
Registered: 2012-11-26
Posts: 129
Website

Re: SynZip Check method shows error dialogs

Thanks!

Offline

Board footer

Powered by FluxBB