@@ -227,10 +227,11 @@ runJavaScript sendBatch entryPoint = do
227 zipWithM_ putMVar resultMVars results
227 zipWithM_ putMVar resultMVars results
228 forM_ callbacksToFree $ \(JSValueReceived val) ->
228 forM_ callbacksToFree $ \(JSValueReceived val) ->
229 atomically (modifyTVar' callbacks (M.delete val))
229 atomically (modifyTVar' callbacks (M.delete val))
230− (_, Failure callbacksToFree results exception) -> do
230+ (_, Failure callbacksToFree results exception err) -> do
231 -- The exception will only be rethrown in Haskell if/when one of the
231 -- The exception will only be rethrown in Haskell if/when one of the
232 -- missing results (if any) is evaluated.
232 -- missing results (if any) is evaluated.
233 putStrLn "A JavaScript exception was thrown! (may not reach Haskell code)"
233 putStrLn "A JavaScript exception was thrown! (may not reach Haskell code)"
234 zipWithM_ putMVar resultMVars $ results <> repeat (ThrowJSValue exception)
235 zipWithM_ putMVar resultMVars $ results <> repeat (ThrowJSValue exception)
235 forM_ callbacksToFree $ \(JSValueReceived val) ->
236 forM_ callbacksToFree $ \(JSValueReceived val) ->
236 atomically (modifyTVar' callbacks (M.delete val))
237 atomically (modifyTVar' callbacks (M.delete val))