Skip to content
This repository was archived by the owner on Sep 8, 2023. It is now read-only.

Commit 633f2a4

Browse files
authored
add pre-output check to exercise
1 parent 4b59fa9 commit 633f2a4

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

skipping-execution/README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ This exercise's `build.gradle` contains a task called `dangerousTask`.
44
The project keeps track of a `riskLevel`, which increases when you run `dangerousTask`.
55
Our reactor will overload and explode if `riskLevel` grows higher than 100.
66

7-
Modify `dangerousTask` to prevent it from executing if `riskLevel` could potentially increase past 100.
8-
However, do so without modifying existing lines of code.
9-
107
- Run `./gradlew dangerousTask` until you reach critical risk levels
11-
- Run `./gradlew dangerousTask` once more, for science
8+
- Run `./gradlew dangerousTask` once more (for science!)
129
- Q: Did your reactor overload? If so, what went wrong?
10+
- Overwrite the value in the `risk.txt` file to `60`.
11+
12+
Modify `dangerousTask` to prevent it from executing if `riskLevel` could potentially increase past 100.
13+
However, do so without modifying anything in the `doLast`-block.
14+
15+
- Run `./gradlew dangerousTask` and watch your `riskLevel` rise
16+
- Q: Is your reactor still overloading?
1317
- Q: What are the differences between `onlyIf`, `return`, `StopExecutionException`, `./gradlewException`? When would you use them?

0 commit comments

Comments
 (0)