Added pokemon exception handling around effect- and brush-updates to prevent issues with wrong implementations.

This commit is contained in:
DarthAffe committed 2015-10-10 12:29:35 +02:00
1 parent 920821deee
commit 2590c4ad2a
5 files changed
+65 -17

No files matched your search

+11
View File
@@ -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
}
}
+22
View File
@@ -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
}
}