Hi Friends.Have you tried to execute the program oustide the debugger? Does it have the same behavior?
I try to use "Try Exception" to notify my users that my file on server is unvailable at the moment but,
I have got an debugger error mesage instead!
How can i get my own message instead and not file not found message by Lazarus?
Try
UrlDownloadToFile(nil, PChar(SourceFile), PChar(DestFile), 0, nil);
except
on E: Exception do begin
ShowMessage('The Server is unavailable at the moment! Try later.');
end;
end;
See the pix i attached with this question? IGet rid of this messagebox and replaced with my own message instead.
Thanks in advance
Bob
Hi eljo. Is the same messages in a different pc i tried!The most possible cause is that you did not enclose the correct piece of code inside the try except block.
It's like the debugger is in the exefile?
/Bob
The Unit URLmon is just a wrapper for a Windows library.
The error happens inside that library.
But UrlDownloadToFile is a function - you get an errorResult, that you dont use.