Skip to content

Commit cf69c4b

Browse files
committed
Make error more informative
1 parent 40ab054 commit cf69c4b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function getCardValue(card) {
6060
return Number(rank);
6161
} else {
6262
throw new Error(
63-
`${card} was passed into the function which is invalid, because one of the conditions failed`
63+
`Invalid rank "${rank}" in card "${card}": expected A, J, Q, K, or a number between 2 and 10`
6464
);
6565
}
6666
}

0 commit comments

Comments
 (0)