~technomancy/fennel#119: 
calling error in fennel.repl readChunk doesn't trigger :onError properly

Noticed that the following code produces a lot of Parse error: nil messages.

(local fennel (require :fennel))
(fennel.repl {:readChunk #(error "oh no!")})

I suppose the nil there should have been oh no!.

Status
RESOLVED FIXED
Submitter
~andreyorst
Assigned to
No-one
Submitted
5 months ago
Updated
5 months ago
Labels
bug

~jaawerth REPORTED FIXED 5 months ago

I just pushed a fix that I believe will cover this for you; not just readChunk, but all parser errors in the REPL were being swallowed and returned as nil due to a variable name change a while back that accidentally left a dangling undefined sym. Since readChunk is wrapped and indirectly invoked by the parser, it should fix this as well, but feel free to reopen if it doesn't :)

~andreyorst 5 months ago

the fix works, thanks!

Register here or Log in to comment, or comment via email.