binaryage / binaryage/cljs-devtools

Catching uncatchables

未关闭
#36 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
idea
主要语言
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

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。