On Sat, Dec 28, 2013 at 3:56 AM, Lee Spector <lspec...@hampshire.edu> wrote:
> > On Dec 27, 2013, at 11:33 PM, guns wrote: > > > On Fri 27 Dec 2013 at 11:23:22PM -0500, Lee Spector wrote: > >> > >> On Dec 27, 2013, at 11:18 PM, guns wrote: > >>> > >>> (defmacro dump-locals [] ... > >>> ` > >> When and where do you call this? > > > > I call this inside of the closest function that raised the exception. > > Ah, so you have to see an exception, edit your code to include a call to > this, re-run, and get to the same exception. > > So it will only help for exception-raising situations that are easy to > repeat, which mine often are not. > It helps to go with the "functional, immutable" flow, in which case if you get an unwanted exception it should *usually* have bubbled up from some failing test. Add a dump-locals where suggested by the stack trace and rerun the failing test and voila! That should do it for almost all non-exogenous exceptions, leaving mainly things like network timeouts and other wonkiness caused by factors outside of your code (and, often, outside of your control anyway). -- -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.