From d542da38b23518ba1486c89fb7a0221ea2564516 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Mon, 22 Dec 2025 11:36:21 +0100 Subject: [PATCH] Added descriptive error message on corrupt ratchet file --- RNS/Destination.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RNS/Destination.py b/RNS/Destination.py index 7f97c23..6f5b1fc 100755 --- a/RNS/Destination.py +++ b/RNS/Destination.py @@ -462,6 +462,10 @@ class Destination: self.ratchets = None self.ratchets_path = None RNS.trace_exception(e) + RNS.log(f"The ratchet file located at {ratchets_path} could not be loaded. This could indicate that the ratchet file has become corrupt.", RNS.LOG_CRITICAL) + RNS.log(f"You can attempt to manually recover the ratchet file, or simply remove it to have Reticulum recreate it on the next use.", RNS.LOG_CRITICAL) + RNS.log(f"If re-initialize this ratchet file, make sure to send an announce for the relevant destination as soon as possible,", RNS.LOG_CRITICAL) + RNS.log(f"so that the new ratchet information is synchronized to the network.", RNS.LOG_CRITICAL) raise OSError("Could not read ratchet file contents for "+str(self)+". The contained exception was: "+str(e), RNS.LOG_ERROR) else: