refactor: Resolving code smells

This commit is contained in:
Chris Cameron
2018-06-07 14:59:31 -04:00
parent 4bc6258b62
commit 18b07abb44
2 changed files with 5 additions and 5 deletions

View File

@@ -66,6 +66,7 @@ namespace ICD.Common.Utils
} }
catch (ObjectDisposedException) catch (ObjectDisposedException)
{ {
// Releasing a disposed mutex in this case is valid behaviour
} }
} }

View File

@@ -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>