feat: catch exception for error in thread

develop
paring 2022-11-09 17:11:51 +09:00
parent 3c29035c02
commit 6a37539b37
Signed by: pikokr
GPG Key ID: DB839724AD14EC9F
1 changed files with 19 additions and 11 deletions

View File

@ -78,6 +78,8 @@ namespace SkyHook
Exception exception = null; Exception exception = null;
new Thread(() => new Thread(() =>
{
try
{ {
if (isHookActive) return; if (isHookActive) return;
@ -94,6 +96,12 @@ namespace SkyHook
while (isHookActive) while (isHookActive)
{ {
} }
}
catch (Exception e)
{
exception = e;
throw;
}
}).Start(); }).Start();
while (!started && exception == null) while (!started && exception == null)