diff --git a/src/main/frontend/extensions/pdf/highlights.cljs b/src/main/frontend/extensions/pdf/highlights.cljs index 0605a69ed2..92ddae9cf0 100644 --- a/src/main/frontend/extensions/pdf/highlights.cljs +++ b/src/main/frontend/extensions/pdf/highlights.cljs @@ -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)]) diff --git a/src/main/frontend/ui.cljs b/src/main/frontend/ui.cljs index 23445186c5..36bef32e34 100644 --- a/src/main/frontend/ui.cljs +++ b/src/main/frontend/ui.cljs @@ -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)