binaryage / binaryage/cljs-devtools
Catching uncatchables
- 主要言語
- Clojure
- スター
- 1.1k
- フォーク
- 51
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
We were having trouble with spec errors in EventListeners. For example, spec errors thrown when handling the response to an ajax request were uncaught and printed badly.
There are Closure Library functions which can help with these cases. Possibly of use for cljs-devtools
```
(ns condense.preload
(:require [goog.debug.entryPointRegistry :as gepr])
(:import [goog.debug ErrorHandler]))
(defn handle-error [e]
(js/console.debug (.-stack e))
(js/console.debug (ex-data e)))
(def error-handler (doto (ErrorHandler. handle-error)
(.protectWindowSetTimeout)
(.protectWindowSetInterval)
(.protectWindowRequestAnimationFrame)))
(gepr/monitorAll error-handler)
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、EventListeners が非同期 Ajax レスポンスからの仕様エラーをどのように処理するかを追跡し、次にその経路を Issue にある Closure Library ErrorHandler と entryPointRegistry の例と比較します。これらのエラーが捕捉され、有用な stack と ex-data の出力とともに報告されれば完了です。ソースファイルもテストも指定されていないため、最初に関連する統合ポイントを特定する必要があります。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- clojure
- 領域
- devtools
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100