Skip to content

Commit a750792

Browse files
committed
Cef.Shutdown - Improve Thread Check error message
1 parent 9b318ab commit a750792

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CefSharp.Core/Cef.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,10 @@ namespace CefSharp
420420
{
421421
if (_initializedThreadId != Thread::CurrentThread->ManagedThreadId)
422422
{
423-
throw gcnew Exception("Shutdown must be called on the same thread that Initialize was called - typically your UI thread. CefSharp was initialized on ManagedThreadId: " + Thread::CurrentThread->ManagedThreadId);
423+
throw gcnew Exception("Cef.Shutdown must be called on the same thread that Cef.Initialize was called - typically your UI thread." +
424+
"If you called Cef.Initialize on a Thread other than the UI thread then you will need to call Cef.Shutdown on the same thread." +
425+
"Cef.Initialize was called on ManagedThreadId: " + _initializedThreadId + "where Cef.Shutdown is being called on" +
426+
"ManagedThreadId:" + Thread::CurrentThread->ManagedThreadId);
424427
}
425428

426429
UIThreadTaskFactory = nullptr;

0 commit comments

Comments
 (0)