core.async

core.async CLJS support incorrect handling of try/catch

Details

  • Type: Defect Defect
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • 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 ...)))

Activity

Hide
Timothy Baldridge added a comment -

Fixed in master

Show
Timothy Baldridge added a comment - Fixed in master
Hide
David Nolen added a comment -

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

Show
David Nolen added a comment - I commented out the try/catch tests in master. I'll hand this one over to you
Hide
Timothy Baldridge added a comment -

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.

Show
Timothy Baldridge added a comment - 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.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: