1
0
Эх сурвалжийг харах

debug: instrument when failed to write the file

Tienson Qin 4 жил өмнө
parent
commit
f0713086d1

+ 3 - 0
src/main/frontend/handler/file.cljs

@@ -246,6 +246,9 @@
                                (fs/write-file! repo (config/get-repo-dir repo) path content
                                                {:old-content original-content}))
                              (p/catch (fn [error]
+                                        (state/pub-event! [:instrument {:type :write-file/failed
+                                                                        :payload {:path path
+                                                                                  :error error}}])
                                         (log/error :write-file/failed {:path path
                                                                        :content content
                                                                        :error error}))))))