Additionally, if you are using the repl to experiment, you may benefit from 
defining and testing each bit as you go.

On Thursday, 19 April 2012 21:59:03 UTC+10, Dave Sann wrote:
>
> clojurescript is still pretty young. Error reporting is not where I expect 
> most people would like to see it. This is a problem for all languages 
> complied to js at the moment.
>
> That said - you can get used to the situation pretty quickly, with a 
> little patience and the occasional challenge.
>
> If you compile with pretty printing or simple optimisations - the code is 
> relatively readable. At least enough to reference back to your source.
>
> If I have errors, I use the stacktrace which you can access easily in 
> chrome for example to get my bearing and figure out what is going on.
>
> As I say, not Ideal - but you do get used to it pretty fast.
>
> I also use logging to trace activity if necessary.
>
> The above error is probably where you have used a variable which is 
> undefined as a function.
>
> Cheers
>
> Dave
>
>
>
>
>
> On Thursday, 19 April 2012 19:55:40 UTC+10, puzzler wrote:
>>
>> I'm trying to get some Clojure code to compile to javascript.
>>
>> So I've got a clojurescript repl up and running, and I was hoping it 
>> would be a straightforward iterative process of:
>> Compile code.
>> Test code.
>> Get detailed bug (or at least a line number) if I used a feature not 
>> available in clojurescript (e.g., letfn).
>> Change code.
>> Repeat.
>>
>> Unfortunately, it seems that all I get when code doesn't work under 
>> clojurescript is stuff like this:
>> org.mozilla.javascript.EcmaError: TypeError: Cannot call method "call" of 
>> undefined (<cljs repl>#52)
>>         at <cljs repl>:52 (anonymous)
>>         at <cljs repl>:52
>>
>> I've got nothing to work with, other than this generic report that 
>> (presumably because the compilation failed), the function remains undefined.
>>
>> So what's the trick for converting code and/or for getting some kind of 
>> meaningful error message in clojurescript?
>>
>> Thanks.
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to