1
1
Fork 0
AtomicKotlinCourse/Preventing Failure/Logging/Exercise 2/task.md

695 B

Logging (#2)

Starting with the solution from Exercise 3 in [Exception Handling], use AtomicLog.kt to log exceptions into the Logger file "LoggingSoln1.txt". You will need to modify transact():

  • Add a call to Loggers error() function before any exception is thrown from transact().

  • Replace unrecoverable exceptions with error() calls.

  • Look for code where none of the exceptions are recoverable, and compact it if you can to log to error() and fail, rather than having multiple catch clauses.

This task doesn't contain automatic tests, so it's always marked as "Correct" when you run "Check". Please compare your solution with the one provided!