Add send logs button to exception dialog
This commit is contained in:
parent
89643b425e
commit
543ccb69e8
|
@ -1,6 +1,8 @@
|
||||||
(ns status-im.utils.error-handler
|
(ns status-im.utils.error-handler
|
||||||
(:require [clojure.string :as string]
|
(:require [clojure.string :as string]
|
||||||
[status-im.utils.utils :as utils]))
|
[status-im.utils.utils :as utils]
|
||||||
|
[status-im.i18n :as i18n]
|
||||||
|
[re-frame.core :as re-frame]))
|
||||||
|
|
||||||
;; Error handling code based on https://gist.github.com/pesterhazy/e6846be1b6712a9038537022d131ce46
|
;; Error handling code based on https://gist.github.com/pesterhazy/e6846be1b6712a9038537022d131ce46
|
||||||
|
|
||||||
|
@ -54,4 +56,8 @@
|
||||||
(handle-error e isFatal)
|
(handle-error e isFatal)
|
||||||
(if js/goog.DEBUG
|
(if js/goog.DEBUG
|
||||||
(some-> orig-handler (.call nil e isFatal))
|
(some-> orig-handler (.call nil e isFatal))
|
||||||
(utils/show-popup "Error" (.-message e))))))))
|
(utils/show-confirmation
|
||||||
|
{:title "Error"
|
||||||
|
:content (.-message e)
|
||||||
|
:confirm-button-text (i18n/label :t/send-logs)
|
||||||
|
:on-accept #(re-frame/dispatch [:logging.ui/send-logs-pressed])})))))))
|
||||||
|
|
Loading…
Reference in New Issue