mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 02:16:30 +00:00
enhance(cli): export-edn prints unexpected errors
especially when an invalid export-type is given
This commit is contained in:
@@ -694,6 +694,8 @@
|
||||
(when-let [conn (worker-state/get-datascript-conn repo)]
|
||||
(worker-db-validate/validate-db conn)))
|
||||
|
||||
;; Returns an export-edn map for given repo. When there's an unexpected error, a map
|
||||
;; with key :export-edn-error is returned
|
||||
(def-thread-api :thread-api/export-edn
|
||||
[repo options]
|
||||
(let [conn (worker-state/get-datascript-conn repo)]
|
||||
@@ -705,7 +707,7 @@
|
||||
(worker-util/post-message :notification
|
||||
["An unexpected error occurred during export. See the javascript console for details."
|
||||
:error])
|
||||
:export-edn-error))))
|
||||
{:export-edn-error (.-message e)}))))
|
||||
|
||||
(def-thread-api :thread-api/get-view-data
|
||||
[repo view-id option]
|
||||
|
||||
Reference in New Issue
Block a user