mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 21:24:58 +00:00
Catching stupid Crestron exception
This commit is contained in:
@@ -42,8 +42,16 @@ namespace ICD.Common.Utils.Extensions
|
|||||||
if (extends == null)
|
if (extends == null)
|
||||||
throw new ArgumentNullException("extends");
|
throw new ArgumentNullException("extends");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
return extends.GetCustomAttributes(typeof(T), inherits).Cast<T>();
|
return extends.GetCustomAttributes(typeof(T), inherits).Cast<T>();
|
||||||
}
|
}
|
||||||
|
// Crestron bug?
|
||||||
|
catch (ArgumentNullException)
|
||||||
|
{
|
||||||
|
return Enumerable.Empty<T>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the custom attribute attached to the member.
|
/// Returns the custom attribute attached to the member.
|
||||||
|
|||||||
Reference in New Issue
Block a user