Printer exception handling

TeeTree VCL for Borland Delphi and C++ Builder.
Post Reply
Collinor
Newbie
Newbie
Posts: 15
Joined: Wed Oct 31, 2007 12:00 am

Printer exception handling

Post by Collinor » Mon May 31, 2010 12:02 pm

The functions TTreePage.GetHeight and TTreePage.GetWidth in unit TeeTree.pas contain a try..except-block to catch EPrinter exceptions. In case your printer spooler service is offline, you'll get an exception of type EOSError (RPC server offline) and the application continues throwing exceptions caused by access violations.
My suggestion is to catch any exceptions in these functions, not just those of type EPrinter.

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Printer exception handling

Post by Yeray » Tue Jun 01, 2010 1:41 pm

Hi Collinor,

You are right. I could reproduce it and it seems to be solved both capturing all the exceptions or only the EOSError. I've added it to the wish list to be studied for inclusion in future releases (TV52014924).
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply