Introduced exception handling to manage potential errors during the loading of the version history file. If a VersionError is encountered, it logs a warning and attempts to remove the corrupted version file. In case of an OSError during this removal process, another warning is logged. Additionally, JSONDecodeError is now caught when attempting to load JSON from the file content, raising a VersionError if such an issue occurs. This improves robustness against corrupted or improperly formatted version history files.
Introduced exception handling to manage potential errors during the loading of the version history file. If a VersionError is encountered, it logs a warning and attempts to remove the corrupted version file. In case of an OSError during this removal process, another warning is logged. Additionally, JSONDecodeError is now caught when attempting to load JSON from the file content, raising a VersionError if such an issue occurs. This improves robustness against corrupted or improperly formatted version history files.
Fixes #7920