Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Trapping errors

edited August 2008 in General
I trying to trap a simple EPrintError error but for some reason it's evading
my except clause. I've got a TPPReport which fails on Print and returns an
EPrintError. MadExcept picks it up and gets the exception message Unable to
open file: .
How come this doesn't pick it up?
begin
strTextFileName := 'somefilename'
frmrapp314.ppReport.AllowPrintToFile := True;
frmrapp314.ppReport.ShowPrintDialog := False;
frmrapp314.ppReport.DeviceType := 'PDF';
frmrapp314.ppReport.TextFileName := strTextFileName;
frmrapp314.ppReport.Print; <- this fails
blnOK := true; <- and then after I've clicked Continue in MadExcept
the debugger continues from here.
end
except
raise Exception.Create(<some message in Norwegian>');
end;

How do I get this picked up?

TIA,
Håvard

Comments

This discussion has been closed.