chlorine-clover 2020-05-26

@seancorfield just published a new version that changed eval-and-render to return a promise. This means that if you (let [res (editor/eval-and-render ...)] (prn res)) you'll see the result being printed. I believe this can help on commands that take too long to run. eval-and-render now also returns :result (in case of success) or :error (on failure). It can return nil too, in case of some internal error, but I believe it'll happen only on some really edge-cases 🙂

Cool! Thank you!

What sort of thing will :error be in that situation @mauricio.szabo?

For example, (/ 10 0) - the exception will come inside :error But, (try (/ 10 0) (catch Throwable t t)) will come inside :result

"the exception" -- just a message or an entire data structure?

Entire data structure. It's not "suitable for extension" yet, but it'll be soon~ish

(Something like that Browsable that we were having trouble)

Just wanted to check before I put it in an Atom popup warning 🙂