diff --git a/Chapters/06_Failure.md b/Chapters/06_Failure.md index d4cc5a5b..68b8d777 100644 --- a/Chapters/06_Failure.md +++ b/Chapters/06_Failure.md @@ -439,7 +439,7 @@ import zio.Console.* def check(t: Temperature) = defer: - printLine("Checking Temperature").run + printLine("Checking Temperature").orDie.run if t.degrees > 0 then ZIO .succeed: @@ -490,8 +490,8 @@ val weatherReport = weatherReportFaulty.catchAll: case exception: Exception => printLine(exception.getMessage) -// case failure: ClimateFailure => -// printLine(failure.message) + case failure: ClimateFailure => + printLine(failure.message) ``` Even though `getTemperature` produces two different types of `ZIO.fail`s, we handle them both in `case exception` because their contained failure objects are both `Exception`s.