Icon View Thread

The following is the text of the current message along with any replies.
Messages 21 to 22 of 22 total
Thread OT: Problem with threads
Thu, Nov 8 2012 9:59 PMPermanent Link

Adam H.

>> If all you want to do in the thread is to tell user you've failed then
>> either use Windows.MessageBox or just set a public string variable in
>> thread with proper message and terminate and then show the dialog in
>> OnTerminate handler.
>
> Or post a message number back to the main form which then shows the appropriate error message.

As an after thought: In my particular instance I'm also running
Eurekalog. I like the way that when I actually raise exceptions how it
creates an error log file, and emails me the log, along with the actual
lines of code, and the call stack that was used that created the exception.

I guess when it comes to threads I won't be able to use this as posting
a message back to the main application will just show a message. (Even
if I do a raise exception - it probably will just show that line of
code, and not the actual code that was trapped in the try / except).

That's OK - I can work with it - as I certainly hope not to have any
undealt with issues by the time I finish, but Eurekalog has saved me
plenty of times in the past - so I would have liked to use it if I could.

Cheers

Adam.
Fri, Nov 9 2012 4:30 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Adam


I've never used Eurekalog so I can't comment but it should be easy to create a test case. In a thread have a small procedure along the lines

procedure CauseAnError;
var
A,B,C:integer;
begin
A:=0;
B:=27;
try
C:=B / A;
Except
end;
end;

and see what Eurekalog does with it.

Roy Lambert Roy Lambert [Team Elevate]
« Previous PagePage 3 of 3
Jump to Page:  1 2 3
Image