You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a recipe throws an exception, only the file name of the source file is shown. Quite often that makes guessing the affected source snippet basically impossible, at least that's my experience from previous bug reports. Therefore adding either a short source snippet or the position in the file (line and row, or offset) would really help debugging recipe exceptions.
Describe the solution you'd like
In a prototype, I just added cursor.toString() to the log output that prints the exception stack trace. While that produced far too much output, it helped me identify the relevant source code in many cases, as this produces a kind of "nested snippets" with the uppermost being the relevant piece.
What problem are you trying to solve?
When a recipe throws an exception, only the file name of the source file is shown. Quite often that makes guessing the affected source snippet basically impossible, at least that's my experience from previous bug reports. Therefore adding either a short source snippet or the position in the file (line and row, or offset) would really help debugging recipe exceptions.
Describe the solution you'd like
In a prototype, I just added
cursor.toString()
to the log output that prints the exception stack trace. While that produced far too much output, it helped me identify the relevant source code in many cases, as this produces a kind of "nested snippets" with the uppermost being the relevant piece.You surely have better ideas how to do that.
Are you interested in contributing this feature to OpenRewrite?
You probably can do that better than me.
The text was updated successfully, but these errors were encountered: