Improve readability and exception comments

Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
Loren Eteval
2026-09-09 12:18:34 +08:00
parent 61d18651a2
commit d8a38c93bf
13 changed files with 67 additions and 1 deletions
+3
View File
@@ -56,7 +56,10 @@ class UserRoutings(Mixins.CleanupOnExit, StorageBackend):
raise TypeError('routing repository root must be an object')
except Exception:
# Any non-exit exceptions
self._restoreFailed = True
logger.exception('failed to restore persisted routings')
return {}
+3
View File
@@ -136,7 +136,10 @@ class UserServers(Mixins.CleanupOnExit, StorageBackend):
raise TypeError('server repository root must contain a model list')
except Exception:
# Any non-exit exceptions
self._restoreFailed = True
logger.exception('failed to restore persisted server configurations')
return {'model': []}
+3
View File
@@ -187,7 +187,10 @@ class UserSubs(Mixins.CleanupOnExit, StorageBackend):
raise TypeError('subscription repository root must be an object')
except Exception:
# Any non-exit exceptions
self._restoreFailed = True
logger.exception('failed to restore persisted subscriptions')
return {}
+2
View File
@@ -56,6 +56,8 @@ class UserTUNSettings(Mixins.CleanupOnExit, StorageBackend):
raise TypeError('TUN settings repository root must be an object')
except Exception:
# Any non-exit exceptions
self._restoreFailed = True
logger.exception('failed to restore persisted TUN settings')