mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2026-11-10 20:46:24 +00:00
Added pokemon exception handling around effect- and brush-updates to prevent issues with wrong implementations.
This commit is contained in:
1 parent
920821deee
commit
2590c4ad2a
5 files changed
+65
-17
No files matched your search
@@ -39,6 +39,12 @@ namespace CUE.NET.Devices.Generic
|
||||
|
||||
#endregion
|
||||
|
||||
#region Events
|
||||
|
||||
public event OnExceptionEventHandler OnException;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
protected AbstractCueDevice(IDeviceInfo info)
|
||||
@@ -142,6 +148,11 @@ namespace CUE.NET.Devices.Generic
|
||||
Marshal.FreeHGlobal(ptr);
|
||||
}
|
||||
|
||||
protected void ManageException(Exception ex)
|
||||
{
|
||||
OnException?.Invoke(this, new OnExceptionEventArgs(ex));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
|
||||
namespace CUE.NET.Devices.Generic
|
||||
{
|
||||
public class OnExceptionEventArgs : EventArgs
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
public Exception Exception { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
public OnExceptionEventArgs(Exception exception)
|
||||
{
|
||||
this.Exception = exception;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user