feat: display line numbers in debugger stack frame elements#1384
feat: display line numbers in debugger stack frame elements#1384sebthom merged 1 commit intoeclipse-lsp4e:mainfrom
Conversation
| } | ||
| } | ||
| } catch (final Exception ex) { | ||
| // Ignore - if we cannot get a line number, skip the suffix |
There was a problem hiding this comment.
I am not clear what exception would be raised that would be expected. It looks to me that if we reach the catch block we should rather log the error. Could we do that?
There was a problem hiding this comment.
Me neither. I just wondered if for some debug servers the sourcename could contain anything that makes new Path(source) throw.
There was a problem hiding this comment.
The only case I can see where there would be an exception is when source is null. What about checking that source != null and logging the exception? I am not worried about having too many logs.
There was a problem hiding this comment.
Actually, if we check for source != null, I think I would remove the try block and let whatever unexpected exception might happen just propagate
There was a problem hiding this comment.
actually getLineNumber() can throw exceptions too. I am logging the exception at warning level now.
rubenporras
left a comment
There was a problem hiding this comment.
Could you log the error rather than silently ignoring it?
I could but if errors are thrown there might be a lot of them and since it is optional info I thought suppressing is ok. |
Fixes #627