Skip to content

Commit 4d4507a

Browse files
authored
Sync all throws in stubs (#2714)
[no important files changed]
1 parent c2af463 commit 4d4507a

File tree

14 files changed

+51
-51
lines changed

14 files changed

+51
-51
lines changed

exercises/concept/amusement-park/amusement-park.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @returns {Visitor} the visitor that was created
1111
*/
1212
export function createVisitor(name, age, ticketId) {
13-
throw new Error('Please implement the createVisitor function.');
13+
throw new Error('Remove this line and implement the function');
1414
}
1515

1616
/**
@@ -20,7 +20,7 @@ export function createVisitor(name, age, ticketId) {
2020
* @returns {Visitor} the visitor without a ticket
2121
*/
2222
export function revokeTicket(visitor) {
23-
throw new Error('Please implement the revokeTicket function.');
23+
throw new Error('Remove this line and implement the function');
2424
}
2525

2626
/**
@@ -31,7 +31,7 @@ export function revokeTicket(visitor) {
3131
* @returns {string} ticket status
3232
*/
3333
export function ticketStatus(tickets, ticketId) {
34-
throw new Error('Please implement the ticketStatus function.');
34+
throw new Error('Remove this line and implement the function');
3535
}
3636

3737
/**
@@ -43,7 +43,7 @@ export function ticketStatus(tickets, ticketId) {
4343
* @returns {string} ticket status
4444
*/
4545
export function simpleTicketStatus(tickets, ticketId) {
46-
throw new Error('Please implement the simpleTicketStatus function.');
46+
throw new Error('Remove this line and implement the function');
4747
}
4848

4949
/**
@@ -53,5 +53,5 @@ export function simpleTicketStatus(tickets, ticketId) {
5353
* @returns {string | undefined} version
5454
*/
5555
export function gtcVersion(visitor) {
56-
throw new Error('Please implement the gtcVersion function.');
56+
throw new Error('Remove this line and implement the function');
5757
}

exercises/concept/bird-watcher/bird-watcher.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* @returns {number} total bird count
1212
*/
1313
export function totalBirdCount(birdsPerDay) {
14-
throw new Error('Please implement the totalBirdCount function');
14+
throw new Error('Remove this line and implement the function');
1515
}
1616

1717
/**
@@ -22,7 +22,7 @@ export function totalBirdCount(birdsPerDay) {
2222
* @returns {number} birds counted in the given week
2323
*/
2424
export function birdsInWeek(birdsPerDay, week) {
25-
throw new Error('Please implement the birdsInWeek function');
25+
throw new Error('Remove this line and implement the function');
2626
}
2727

2828
/**
@@ -33,5 +33,5 @@ export function birdsInWeek(birdsPerDay, week) {
3333
* @returns {void} should not return anything
3434
*/
3535
export function fixBirdCountLog(birdsPerDay) {
36-
throw new Error('Please implement the fixBirdCountLog function');
36+
throw new Error('Remove this line and implement the function');
3737
}

exercises/concept/coordinate-transformation/coordinate-transformation.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* translated coordinate pair in the form [x, y]
1616
*/
1717
export function translate2d(dx, dy) {
18-
throw new Error('Implement the translate2d function');
18+
throw new Error('Remove this line and implement the function');
1919
}
2020

2121
/**
@@ -29,7 +29,7 @@ export function translate2d(dx, dy) {
2929
* scaled coordinate pair in the form [x, y]
3030
*/
3131
export function scale2d(sx, sy) {
32-
throw new Error('Implement the scale2d function');
32+
throw new Error('Remove this line and implement the function');
3333
}
3434

3535
/**
@@ -43,7 +43,7 @@ export function scale2d(sx, sy) {
4343
* transformed coordinate pair in the form [x, y]
4444
*/
4545
export function composeTransform(f, g) {
46-
throw new Error('Implement the composeTransform function');
46+
throw new Error('Remove this line and implement the function');
4747
}
4848

4949
/**
@@ -56,5 +56,5 @@ export function composeTransform(f, g) {
5656
* if the arguments are the same on subsequent calls, or compute a new result if they are different.
5757
*/
5858
export function memoizeTransform(f) {
59-
throw new Error('Implement the memoizeTransform function');
59+
throw new Error('Remove this line and implement the function');
6060
}

exercises/concept/custom-signs/custom-signs.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515

1616
export function buildSign(occasion, name) {
17-
throw new Error('Implement the buildSign function');
17+
throw new Error('Remove this line and implement the function');
1818
}
1919

2020
/**
@@ -26,7 +26,7 @@ export function buildSign(occasion, name) {
2626
*/
2727

2828
export function buildBirthdaySign(age) {
29-
throw new Error('Implement the buildBirthdaySign function');
29+
throw new Error('Remove this line and implement the function');
3030
}
3131

3232
/**
@@ -39,7 +39,7 @@ export function buildBirthdaySign(age) {
3939
*/
4040

4141
export function graduationFor(name, year) {
42-
throw new Error('Implement the graduationFor function');
42+
throw new Error('Remove this line and implement the function');
4343
}
4444

4545
/**
@@ -53,5 +53,5 @@ export function graduationFor(name, year) {
5353
*/
5454

5555
export function costOf(sign, currency) {
56-
throw new Error('Implement the costOf function');
56+
throw new Error('Remove this line and implement the function');
5757
}

exercises/concept/factory-sensors/factory-sensors.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class OverheatingError extends Error {
1616
* @throws {Error}
1717
*/
1818
export function checkHumidityLevel(humidityPercentage) {
19-
throw new Error('Implement the checkHumidity function');
19+
throw new Error('Remove this line and implement the function');
2020
}
2121

2222
/**
@@ -26,7 +26,7 @@ export function checkHumidityLevel(humidityPercentage) {
2626
* @throws {ArgumentError|OverheatingError}
2727
*/
2828
export function reportOverheating(temperature) {
29-
throw new Error('Implement the reportOverheating function');
29+
throw new Error('Remove this line and implement the function');
3030
}
3131

3232
/**
@@ -41,5 +41,5 @@ export function reportOverheating(temperature) {
4141
* @throws {ArgumentError|OverheatingError|Error}
4242
*/
4343
export function monitorTheMachine(actions) {
44-
throw new Error('Implement the monitorTheMachine function');
44+
throw new Error('Remove this line and implement the function');
4545
}

exercises/concept/high-score-board/high-score-board.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @returns {Record<string, number>} new score board
88
*/
99
export function createScoreBoard() {
10-
throw new Error('Please implement the createScoreBoard function');
10+
throw new Error('Remove this line and implement the function');
1111
}
1212

1313
/**
@@ -19,7 +19,7 @@ export function createScoreBoard() {
1919
* @returns {Record<string, number>} updated score board
2020
*/
2121
export function addPlayer(scoreBoard, player, score) {
22-
throw new Error('Please implement the addPlayer function');
22+
throw new Error('Remove this line and implement the function');
2323
}
2424

2525
/**
@@ -30,7 +30,7 @@ export function addPlayer(scoreBoard, player, score) {
3030
* @returns {Record<string, number>} updated score board
3131
*/
3232
export function removePlayer(scoreBoard, player) {
33-
throw new Error('Please implement the removePlayer function');
33+
throw new Error('Remove this line and implement the function');
3434
}
3535

3636
/**
@@ -42,7 +42,7 @@ export function removePlayer(scoreBoard, player) {
4242
* @returns {Record<string, number>} updated score board
4343
*/
4444
export function updateScore(scoreBoard, player, points) {
45-
throw new Error('Please implement the updateScore function');
45+
throw new Error('Remove this line and implement the function');
4646
}
4747

4848
/**
@@ -52,5 +52,5 @@ export function updateScore(scoreBoard, player, points) {
5252
* @returns {Record<string, number>} updated score board
5353
*/
5454
export function applyMondayBonus(scoreBoard) {
55-
throw new Error('Please implement the applyMondayBonus function');
55+
throw new Error('Remove this line and implement the function');
5656
}

exercises/concept/lucky-numbers/lucky-numbers.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @returns {number} sum of the two arrays
99
*/
1010
export function twoSum(array1, array2) {
11-
throw new Error('Implement the twoSum function');
11+
throw new Error('Remove this line and implement the function');
1212
}
1313

1414
/**
@@ -18,7 +18,7 @@ export function twoSum(array1, array2) {
1818
* @returns {boolean} whether the number is a palindrome or not
1919
*/
2020
export function luckyNumber(value) {
21-
throw new Error('Implement the luckyNumber function');
21+
throw new Error('Remove this line and implement the function');
2222
}
2323

2424
/**
@@ -29,5 +29,5 @@ export function luckyNumber(value) {
2929
* @returns {string} error message
3030
*/
3131
export function errorMessage(input) {
32-
throw new Error('Implement the errorMessage function');
32+
throw new Error('Remove this line and implement the function');
3333
}

exercises/concept/mixed-juices/mixed-juices.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* @returns {number} time in minutes
1212
*/
1313
export function timeToMixJuice(name) {
14-
throw new Error('Please implement the timeToMixJuice function');
14+
throw new Error('Remove this line and implement the function');
1515
}
1616

1717
/**
@@ -23,7 +23,7 @@ export function timeToMixJuice(name) {
2323
* @returns {number} number of limes cut
2424
*/
2525
export function limesToCut(wedgesNeeded, limes) {
26-
throw new Error('Please implement the limesToCut function');
26+
throw new Error('Remove this line and implement the function');
2727
}
2828

2929
/**
@@ -34,5 +34,5 @@ export function limesToCut(wedgesNeeded, limes) {
3434
* @returns {string[]} remaining orders after the time is up
3535
*/
3636
export function remainingOrders(timeLeft, orders) {
37-
throw new Error('Please implement the remainingOrders function');
37+
throw new Error('Remove this line and implement the function');
3838
}

exercises/concept/nullability/nullability.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
* @returns {string} the text to print on the badge
1515
*/
1616
export function printBadge(id, name, department) {
17-
throw new Error('Please implement the printBadge function');
17+
throw new Error('Remove this line and implement the function');
1818
}

exercises/concept/ozans-playlist/ozans-playlist.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* @returns {string[]} new playlist with unique entries
1212
*/
1313
export function removeDuplicates(playlist) {
14-
throw new Error('Please implement the removeDuplicates function');
14+
throw new Error('Remove this line and implement the function');
1515
}
1616

1717
/**
@@ -22,7 +22,7 @@ export function removeDuplicates(playlist) {
2222
* @returns {boolean} whether the track is in the playlist
2323
*/
2424
export function hasTrack(playlist, track) {
25-
throw new Error('Please implement the hasTrack function');
25+
throw new Error('Remove this line and implement the function');
2626
}
2727

2828
/**
@@ -33,7 +33,7 @@ export function hasTrack(playlist, track) {
3333
* @returns {string[]} new playlist
3434
*/
3535
export function addTrack(playlist, track) {
36-
throw new Error('Please implement the addTrack function');
36+
throw new Error('Remove this line and implement the function');
3737
}
3838

3939
/**
@@ -44,7 +44,7 @@ export function addTrack(playlist, track) {
4444
* @returns {string[]} new playlist
4545
*/
4646
export function deleteTrack(playlist, track) {
47-
throw new Error('Please implement the deleteTrack function');
47+
throw new Error('Remove this line and implement the function');
4848
}
4949

5050
/**
@@ -54,5 +54,5 @@ export function deleteTrack(playlist, track) {
5454
* @returns {string[]} list of artists
5555
*/
5656
export function listArtists(playlist) {
57-
throw new Error('Please implement the listArtists function');
57+
throw new Error('Remove this line and implement the function');
5858
}

0 commit comments

Comments
 (0)