Question : Exception processing does not intersept error.

Hi,

I have a Delphi 7 program running on an XP Box SP3.

I have a very simple program that open an image file and displays it in an ActiveX control.   The image processing Control is called ImageMan from data-tech.com.  

According to the vendor, the the Open Dialogue ActiveX control does not provide error handling in Delphi.  So I am attempting to use Delphi's error handling capabilities.

When I open an image file with with what appea to have a bad format, I get an OLE error and have to Reset the program.  I can open the same file in MS Image Viewer OK.

Is there a way to make Delphi 7, intercept errors in an ActiveX control?

The code and image of error are below.

Thanks.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure TForm1.btnLoadImageClick(Sender: TObject);
begin
  try
     if IM1.GetFilename then
     with IM1 do
     begin
      Refresh;
     end;
  except
  on E : Exception do
      ShowMessage(E.ClassName+' error raised, with message : '+E.Message) ;
  end;
end;
Attachments:
 
Error Message.
Error Message.
 

Answer : Exception processing does not intersept error.

I think that the following answers your question:

"According to the vendor, the the Open Dialogue ActiveX control does not provide error handling in Delphi."

Most commonly, when a vendor says that they don't provide for error handling in Delphi, they know what they are talking about. ;-)

Random Solutions  
 
programming4us programming4us