Open chinwobble opened 3 years ago
I think you did this one just to try
and catch
me!
I do already have a function in autoload/vira.vim
for error_msg(code, msg)
I also have a concept for it just no plan as of you. I do believe the first proper step for an error guide would be a CATEGORY breakdown, Organization and then displays.
I believe I even started to adjust this error message preemptively for out async tasks and then this cam up. It may not be the same on dev
right now.
Sadly display is done but that was the only truly easy part.
Current Idea:
function! vira#_select() "{{{2
let current_pos = getpos('.')
let value = vira#_getter()
if expand('%:t') == 'vira_report'
let issueTest = substitute(substitute(value,'(','','g'),')','','g')
let issueTest = substitute(substitute(issueTest,'[','','g'),']','','g')
let issueTest = substitute(substitute(issueTest,'{','','g'),'}','','g')
let issueTest = substitute(issueTest,'│','','g')
silent! if execute('python3 Vira.api.jira.search_issues("issue = ' . issueTest . '")') == ''
let g:vira_active_issue = issueTest
call vira#_menu('report')
else
call vira#_browse(expand('<cWORD>'))
endif
else
call vira#_filter_load()
if s:vira_highlight != '' && stridx(s:vira_highlight, '|' . value . '|') < 0
if s:vira_menu_type == 'assign_issue' || s:vira_menu_type == 'epic' || s:vira_menu_type == 'issuetype' || s:vira_menu_type == 'set_status' || s:vira_menu_type == 'priority' || s:vira_menu_type == 'epic' || s:vira_menu_type == 'issues' || s:vira_menu_type == 'servers'
let s:vira_highlight = '|' . value . '|'
else | let s:vira_highlight = s:vira_highlight . value . '|' | endif
elseif s:vira_highlight == ''
let s:vira_highlight = '|' . value . '|'
endif
call vira#_highlight()
call setpos('.', current_pos)
endif
endfunction
Pretty sure I will need to start with that if
statement.
A note for myself and some feedback.
Multiple servers may be possible to check. Start with the one you are in then go down the list. Then fail.
The db has a note for this already in my private notes as we will be able to find where that issue is without changing servers.
branch dev
steps to repro
if the JIRA ABC-1234 is not found in your server, it print a stacktrace to the current buffer. It should just return an error message at the bottom.