@@ -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.")
(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)