mirror of
https://github.com/penpot/penpot.git
synced 2025-08-06 06:28:20 +02:00
✨ Improve worker error handling
Use the global error handlers for handle also the worker errors.
This commit is contained in:
parent
9582cc0211
commit
b87e3c22b3
2 changed files with 9 additions and 9 deletions
|
@ -7,19 +7,16 @@
|
|||
(ns app.main.worker
|
||||
(:require
|
||||
[app.config :as cfg]
|
||||
[app.main.errors :as err]
|
||||
[app.util.worker :as uw]))
|
||||
|
||||
(defn on-error
|
||||
[error]
|
||||
(js/console.error "Error on worker" (pr-str error)))
|
||||
|
||||
(defonce instance (atom nil))
|
||||
|
||||
(defn init!
|
||||
[]
|
||||
(reset!
|
||||
instance
|
||||
(uw/init cfg/worker-uri on-error)))
|
||||
(uw/init cfg/worker-uri err/on-error)))
|
||||
|
||||
(defn ask!
|
||||
[message]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue