mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-15 20:54:58 +00:00
refactor: Resolving code smells
This commit is contained in:
@@ -66,6 +66,7 @@ namespace ICD.Common.Utils
|
|||||||
}
|
}
|
||||||
catch (ObjectDisposedException)
|
catch (ObjectDisposedException)
|
||||||
{
|
{
|
||||||
|
// Releasing a disposed mutex in this case is valid behaviour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -277,21 +277,20 @@ namespace ICD.Common.Utils
|
|||||||
throw new ArgumentNullException("convertFunc");
|
throw new ArgumentNullException("convertFunc");
|
||||||
|
|
||||||
result = default(T);
|
result = default(T);
|
||||||
bool retVal = false;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
result = convertFunc(value);
|
result = convertFunc(value);
|
||||||
retVal = true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (FormatException)
|
catch (FormatException)
|
||||||
{
|
{
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
catch (InvalidCastException)
|
catch (InvalidCastException)
|
||||||
{
|
{
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return retVal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user