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