Fork me on GitHub
#cljs-dev
<
2017-01-12
>
shaunlebron14:01:03

I’d like to setup an error handler in cljs.closure/watch like we can with warning handlers

shaunlebron14:01:11

maybe I can setup a PR that inserts such an error handler here:

(catch Throwable e
  (binding [*out* *err*]
    (println (Throwables/getStackTraceAsString e))))

shaunlebron14:01:12

would allow users to customize error printing without implementing their own watch function, which seems fairly involved

shaunlebron16:01:29

trying to figure out the best way to change the api to allow this. Thinking of adding build.api/*error-handler* to keep the build.api/watch api stable, and then pass the error-handler as an extra arg to closure/watch

dnolen20:01:14

@shaunlebron I don’t see why this can’t just be done as a new option

dnolen20:01:21

adding dyn vars or changing sig undesirable