mirror of https://github.com/logseq/logseq
ui: capture invalid pdf error
parent
3973f2794e
commit
6746c8813e
|
@ -1078,9 +1078,19 @@
|
|||
"MissingPDFException"
|
||||
(do
|
||||
(notification/show!
|
||||
(str (.-message error) " Is this the correct path?")
|
||||
:error
|
||||
false)
|
||||
(str (.-message error) " Is this the correct path?")
|
||||
:error
|
||||
false)
|
||||
(state/set-state! :pdf/current nil))
|
||||
|
||||
"InvalidPDFException"
|
||||
(do
|
||||
(notification/show!
|
||||
(str (.-message error) "\n"
|
||||
"Is this .pdf file corrupted?\n"
|
||||
"Please confirm with external pdf viewer.")
|
||||
:error
|
||||
false)
|
||||
(state/set-state! :pdf/current nil)))))
|
||||
[(:error state)])
|
||||
|
||||
|
|
|
@ -715,6 +715,9 @@
|
|||
< {:did-catch
|
||||
(fn [state error _info]
|
||||
(log/error :exception error)
|
||||
(notification-handler/show!
|
||||
(str "Error caught by UI!\n " error)
|
||||
:error)
|
||||
(assoc state ::error error))}
|
||||
[{error ::error, c :rum/react-component} error-view view]
|
||||
(if (some? error)
|
||||
|
|
Loading…
Reference in New Issue