From 721025b10c608ce8fa902085c48f520921e1d07b Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 12 Dec 2024 13:49:20 +1100 Subject: [PATCH] feat: Add more descriptive cache error message --- cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache.py b/cache.py index 531f5b7..6265ec9 100644 --- a/cache.py +++ b/cache.py @@ -33,7 +33,7 @@ def file_cache(ttl=3600): with open(cache_file, "w") as f: json.dump({"timestamp": time(), "result": result}, f) except Exception as e: - print(f"Error during cache refresh: {e}",flush=True) + print(f"Error during cache refresh of {cache_file} (Name: {func.__name__}): {e}") threading.Thread(target=refresh_loop).start()