Merge pull request #259 from rm-hull/bugfix/handle-nREPL-stacktrace
Handle new/old nREPL stacktraces - fixes #258
This commit is contained in:
commit
2bab337396
@ -182,7 +182,12 @@ endfunction
|
||||
|
||||
function! s:extract_last_stacktrace(nrepl, session) abort
|
||||
if a:nrepl.has_op('stacktrace')
|
||||
let stacktrace = filter(a:nrepl.message({'op': 'stacktrace', 'session': a:session}), 'has_key(v:val, "file")')
|
||||
let stacktrace = a:nrepl.message({'op': 'stacktrace', 'session': a:session})
|
||||
if len(stacktrace) > 0 && has_key(stacktrace[0], 'stacktrace')
|
||||
let stacktrace = stacktrace[0].stacktrace
|
||||
endif
|
||||
|
||||
call filter(stacktrace, 'has_key(v:val, "file")')
|
||||
if !empty(stacktrace)
|
||||
return map(stacktrace, 'v:val.class.".".v:val.method."(".v:val.file.":".v:val.line.")"')
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user