Compare commits

...

1 Commits

Author SHA1 Message Date
John Bintz
a9f4b53155 try for clojure and clojurescript stacktraces 2016-02-13 12:39:51 -05:00

View File

@ -192,7 +192,8 @@ function! s:extract_last_stacktrace(nrepl, session) abort
return map(stacktrace, 'v:val.class.".".v:val.method."(".v:val.file.":".v:val.line.")"') return map(stacktrace, 'v:val.class.".".v:val.method."(".v:val.file.":".v:val.line.")"')
endif endif
endif endif
let format_st = '(symbol (str "\n\b" (apply str (interleave (repeat "\n") (map str (.getStackTrace *e)))) "\n\b\n"))' let try_for_stacktrace = '(map #(str % "\n") (try (.getStackTrace *e) (catch :default je (try (aget *e "stack") (catch :default jse [])) [])))'
let format_st = '(symbol (str "\n\b" (apply str '.try_for_stacktrace.') "\n\b\n"))'
let response = a:nrepl.process({'op': 'eval', 'code': '['.format_st.' *3 *2 *1]', 'ns': 'user', 'session': a:session}) let response = a:nrepl.process({'op': 'eval', 'code': '['.format_st.' *3 *2 *1]', 'ns': 'user', 'session': a:session})
try try
let stacktrace = split(get(split(response.value[0], "\n\b\n"), 1, ""), "\n") let stacktrace = split(get(split(response.value[0], "\n\b\n"), 1, ""), "\n")