Ver Fonte

chore: refine error logging

Andelf há 2 anos atrás
pai
commit
95c34f34ae
2 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 0
      src/main/frontend/fs/sync.cljs
  2. 0 1
      src/main/frontend/util/fs.cljs

+ 2 - 0
src/main/frontend/fs/sync.cljs

@@ -784,6 +784,8 @@
 (defn- <retry-rsapi [f]
   (go-loop [n 3]
     (let [r (<! (f))]
+      (when (instance? ExceptionInfo r)
+        (js/console.error "rsapi error:" (str (ex-cause r))))
       (if (and (instance? ExceptionInfo r)
                (string/index-of (str (ex-cause r)) "operation timed out")
                (> n 0))

+ 0 - 1
src/main/frontend/util/fs.cljs

@@ -48,7 +48,6 @@
   [root]
   (when (string? root)
     (p/let [exists? (fs/file-exists? root "logseq/graphs-txid.edn")]
-      (prn ::ex exists?)
       (when exists?
         (-> (p/let [txid-str (fs/read-file root "logseq/graphs-txid.edn")
                     txid-meta (and txid-str (reader/read-string txid-str))]