Skip to content

Commit 875d3be

Browse files
committed
Added error handling logs for invalid card cases in getCardValue function
1 parent 5aaf396 commit 875d3be

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Sprint-3/1-implement-and-rewrite-tests/implement/3-get-card-value.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,14 @@ try {
8888

8989
// This line will not be reached if an error is thrown as expected
9090
console.error("Error was not thrown for invalid card");
91-
} catch (e) {}
91+
} catch (e) {
92+
console.log("Error was thrown for invalid card as expected");
93+
}
9294

9395
// What other invalid card cases can you think of?
9496
try {
9597
getCardValue("1♠");
9698
console.error("Error was not thrown for invalid card");}
97-
catch (e) {}
99+
catch (e) {
100+
console.log("Error was thrown for invalid card as expected");
101+
}

0 commit comments

Comments
 (0)