Discarding "Thread has excited... " output

  • Thread starter Thread starter =?ISO-8859-15?Q?Martin_P=F6pping?=
  • Start date Start date
?

=?ISO-8859-15?Q?Martin_P=F6pping?=

Hello,

I am using threads in my program and getting hundreds of
"the thread has exited..." messages.

Is there a way to discard the output of these messages?


Regards,

Martin
 
I would advise against that. I think you should find out why it is doing it
first and fix it.

But anyhow to bypass it try:

try
{
// you're code
}
catch (Exception e)
{
// you can read the error code in e.Message
}

hope this helps.
 
Kfir said:
I would advise against that. I think you should find out why it is doing it
first and fix it.

Ahhh! So this is really an error?

I am also getting it, when I do not use threads sometimes.
Maybe because of the STAThread.

So why does this error occur normally?


Regards,
Martin
 
This error occurs when you try to access a thread that has completed and
exited. It is normal to get it. However, if you get it when you aren't
expecting to get it, you need to debug your thread to find out why it is
exiting early.

Mike Ober.
 
Michael said:
This error occurs when you try to access a thread that has completed and
exited. It is normal to get it. However, if you get it when you aren't
expecting to get it, you need to debug your thread to find out why it is
exiting early.

Ok an if it is normal to get it and i am expecting to get it...
Is the only way to discard it to use try/catch?

My current solution is to use a logging api and to write these errors to
a special log-file.


Regards,

Martin
 
Martin Pöpping said:
Ok an if it is normal to get it and i am expecting to get it...
Is the only way to discard it to use try/catch?

My current solution is to use a logging api and to write these errors to a special
log-file.

You should only get these messages when running in the debugger, are you sure you get this
running release mode code?
Also, can you post the exact message you get?

Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top