695 B
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
Logger
serror()
function before any exception is thrown fromtransact()
. -
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 multiplecatch
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!