mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 12:07:05 +00:00
refactor: Resolving code smells
This commit is contained in:
parent
4bc6258b62
commit
18b07abb44
2 changed files with 5 additions and 5 deletions
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue