Skip to content

Commit 1beba2e

Browse files
author
Gonzalo Diaz
committed
[REFACTOR] try...catch specific Exception
1 parent 16284ee commit 1beba2e

File tree

1 file changed

+1
-1
lines changed
  • src/algorithm_exercises_csharp/hackerrank/interview_preparation_kit/dictionaries_and_hashmaps

1 file changed

+1
-1
lines changed

src/algorithm_exercises_csharp/hackerrank/interview_preparation_kit/dictionaries_and_hashmaps/RansomNote.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static bool checkMagazineCompute(List<string> magazine, List<string> note
4545
throw new InvalidValueException("Value can't go below 0");
4646
}
4747
}
48-
catch
48+
catch (InvalidValueException)
4949
{
5050
return false;
5151
}

0 commit comments

Comments
 (0)