Add NativeInteropException for native interop crashes
This commit is contained in:
@@ -261,7 +261,7 @@ namespace FlaxEngine.Interop
|
||||
return;
|
||||
}
|
||||
|
||||
throw new Exception("Tried to free non-pooled ManagedArray as pooled ManagedArray");
|
||||
throw new NativeInteropException("Tried to free non-pooled ManagedArray as pooled ManagedArray");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -499,7 +499,7 @@ namespace FlaxEngine.Interop
|
||||
else if (weakPoolOther.TryGetValue(handle, out value))
|
||||
return value;
|
||||
|
||||
throw new Exception("Invalid ManagedHandle");
|
||||
throw new NativeInteropException("Invalid ManagedHandle");
|
||||
}
|
||||
|
||||
internal static void SetObject(IntPtr handle, object value)
|
||||
@@ -527,7 +527,7 @@ namespace FlaxEngine.Interop
|
||||
else if (weakPoolOther.ContainsKey(handle))
|
||||
weakPoolOther[handle] = value;
|
||||
|
||||
throw new Exception("Invalid ManagedHandle");
|
||||
throw new NativeInteropException("Invalid ManagedHandle");
|
||||
}
|
||||
|
||||
internal static void FreeHandle(IntPtr handle)
|
||||
@@ -556,7 +556,7 @@ namespace FlaxEngine.Interop
|
||||
else
|
||||
return;
|
||||
|
||||
throw new Exception("Invalid ManagedHandle");
|
||||
throw new NativeInteropException("Invalid ManagedHandle");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user