Skip to content

Commit ba6a6f5

Browse files
committed
Fix correspondence between solution code and exercise template
Issue marijnh#475
1 parent 7a1e623 commit ba6a6f5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

code/solutions/08_1_retry.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
function MultiplicatorUnitFailure() {}
1+
class MultiplicatorUnitFailure extends Error {}
22

33
function primitiveMultiply(a, b) {
4-
if (Math.random() < 0.5) {
4+
if (Math.random() < 0.2) {
55
return a * b;
66
} else {
7-
throw new MultiplicatorUnitFailure();
7+
throw new MultiplicatorUnitFailure("Klunk");
88
}
99
}
1010

@@ -21,4 +21,3 @@ function reliableMultiply(a, b) {
2121

2222
console.log(reliableMultiply(8, 8));
2323
// → 64
24-

0 commit comments

Comments
 (0)