Re: silent sftp - WeOnlyDo Discussion board

Re: silent sftp (General questions)

by Haarek Ryeng, Monday, November 08, 2004, 10:00 (7111 days ago) @ Joachim

Haarek,

I'm 100 positive error must be trapped somehow, we've had such issues before and they were fixed like that. Let me ask arround (or try it here) what exactly to do to catch it. I'll keep you posted.

Kreso

Actually the error is trapped using try...except...end though this behaviour is only achived when not executing the application inside the Delphi IDE, because the Delphi Debugger will always notice you about exceptions that occured no matter if the handled by try...except..end or not. If you execute your application outside the Delphi IDE and have trapped the error properly by usind try...except...end you won't get any dialog popping up!

Best regards,

Joachim :-)

I've have tons of other exception handling code in my application that the Delphi debugger leaves alone. Are you sure there is not a seperate thread in your component?

FDone := false;
try
FSFTP.PutData(Stream.DataString,'./'+path);
if not FDone then
raise Exception.Create('PutStream failed ');
except on e:exception do
raise exception.Create('Putstream failed due to external exception ');
end;

I've tried running the unittest application (DUnit framework) both in the debugger and on the outside as a standalone .exe-file. The exception handling code (raise exception.Create('putstr...) is not reached before I OK the exception dialog presented.

Is it possible that COM-exceptions are handled in a special manner?

- Haarek -


Complete thread: