flow-development-collection
flow-development-collection copied to clipboard
Better exception message output with code snippet line of thrown error.
I think it would be helpful to show additionally to the stack trace the code line which caused the error.
fx. when calling a method on null, the stack trace will only show the call to the method, where the error will be thrown, but I think it's also helpful to use the line and filename of the exception to show the snippet where the exception occurs.
I could imagine instead of using Debugger::getCodeSnippet creating Debugger::getCodeSnippetWithoutFileInfos or something (since getCodeSnippet will render the file names too)
Alternatively, it could also make sense adding the code snipped on top of the stack trace.
(note to myself: make sure this work correctly with nested exceptions)
what do you think?
The more concrete error messages and exceptions while developing, I'm total in favor of that 🤗