degree9 / meta

A stack. A framework. A conversation.
MIT License
132 stars 14 forks source link

pushing only the message of an error in meta.promise/err makes errors hard to debug #22

Closed thedavidmeister closed 6 years ago

thedavidmeister commented 6 years ago

Lots of useful info gets thrown away, making promises harder to debug than necessary.

compare:

localhost_8080___login_and_new_issue_ _degree9_meta localhost_8080___login
thedavidmeister commented 6 years ago
   (prom/catch
    (fn [err]
     (.error js/console (.-message err) err))))))
benjamingr commented 6 years ago

Hey, asking for Node.js - why are promises harder to debug here? Is there anything we can do to have a better promises story for people transpiling clojure/cjs to Node?

burn2delete commented 6 years ago

@benjamingr are you asking about this library specifically? I find the debugging process is fairly straight forward with promises. Simply catch and prn at the top most level and use pretty errors deeper down.