feat: catch exception for error in thread
parent
3c29035c02
commit
6a37539b37
|
@ -79,20 +79,28 @@ namespace SkyHook
|
|||
|
||||
new Thread(() =>
|
||||
{
|
||||
if (isHookActive) return;
|
||||
|
||||
var result = SkyHookNative.StartHook(HookCallback);
|
||||
|
||||
if (result != null)
|
||||
try
|
||||
{
|
||||
exception = new SkyHookException(result);
|
||||
if (isHookActive) return;
|
||||
|
||||
var result = SkyHookNative.StartHook(HookCallback);
|
||||
|
||||
if (result != null)
|
||||
{
|
||||
exception = new SkyHookException(result);
|
||||
}
|
||||
|
||||
isHookActive = true;
|
||||
started = true;
|
||||
|
||||
while (isHookActive)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
isHookActive = true;
|
||||
started = true;
|
||||
|
||||
while (isHookActive)
|
||||
catch (Exception e)
|
||||
{
|
||||
exception = e;
|
||||
throw;
|
||||
}
|
||||
}).Start();
|
||||
|
||||
|
|
Reference in New Issue