Root > Reference > All Classes > TEurekaExceptionInfo > Properties > TEurekaExceptionInfo.ThreadID

Property TEurekaExceptionInfo.ThreadID

Previous pageReturn to chapter overviewNext page   

Thread ID (actual exception's thread).

 

Unit

EException

 

Value

ID of thread. It identificates a thread that has raised or re-raised the exception.

 

Remarks

This value indicates exception thread. The same code may be run in multiple threads. This property can be used to distinguish between same exceptions in different threads.

 

Warning

This value identificates a thread that has raised or re-raised the exception. In other words, if you take exception from a background thread (TThread) and re-raise it in the main thread - this property will return ID of the main thread, since the main thread has re-raised the exception. If you want to know which thread has originally raised the exception - use the .ExceptionThreadID property instead.

 

Warning

.ThreadID does not always match GetCurrentThreadID function. For example, a stack overflow exception will have .ThreadID set to the thread which has raised the stack overflow exception. However, the GetCurrentThreadID function will return a different ID, because all stack overflow exceptions are being handled in a standalone service background thread.

 

Tip

In most cases, but not always: .ThreadID = .ExceptionThreadID = GetCurrentThreadID.

 

See also




Send feedback... Build date: 2023-09-11
Last edited: 2023-09-11
PRIVACY STATEMENT
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.


Permanent link to this article: https://www.eurekalog.com/help/eurekalog/topic_property_eexception_teurekaexceptioninfo_threadid.php