What happens to the phonebook if a loading or saving error occurs? Explain.
Answer:
##############################################################################
# Python From Scratch
# Author: Nilo Ney Coutinho Menezes
# Editora Novatec (c) 2010-2025 - LogiKraft 2025
# Site: https://pythonfromscratch.com
# ISBN: 978-85-7522-949-1 (Paperback), 978-85-7522-950-7 (hardcover), 978-85-7522-951-4 (ebook)
#
# File: chapter 09/exercise-09-24.py.py
##############################################################################
# In case of a read error, the program stops executing.
# If the error occurs during saving, the unsaved data
# will be lost.
# These problems can be solved by modifying the
# read and save functions, adding try/except blocks.
# Ideally, the program should display the error message and continue running.
# In the case of saving, the data should not be lost and the user should be able
# to try again.