<< Back to previous view

[ASYNC-11] core.async CLJS support incorrect handling of try/catch Created: 19/Jul/13  Updated: 26/Jul/13  Resolved: 26/Jul/13

Status: Resolved
Project: core.async
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: David Nolen Assignee: Timothy Baldridge
Resolution: Completed Votes: 0
Labels: None

Approval: Accepted

 Description   

core.async is defaulting to lein cljsbuild's ClojureScript instead of more recent versions, this has hidden an error with respect to try/catch. core.async try/catch handling emits code like:

(try ex_0 (do ...)))

This is not correct. ClojureScript requires that you specify the prototype of the error that you want to match. Code like this will result in an error about invalid binding form.

You must emit code that looks like this:

(try js/Error ex_0 (do ...)))


 Comments   
Comment by Timothy Baldridge [ 19/Jul/13 11:48 AM ]

lol, I had this code in place, but removed it because it wouldn't compile correctly. This must have changed in a recent version of CLJS.

Comment by David Nolen [ 19/Jul/13 11:51 AM ]

I commented out the try/catch tests in master. I'll hand this one over to you

Comment by Timothy Baldridge [ 26/Jul/13 8:17 AM ]

Fixed in master

Generated at Thu Aug 21 11:19:51 CDT 2014 using JIRA 4.4#649-r158309.