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
For some reason, at the top of the stack of one particular error, I have only the error message, rather than a line with a filename. Therefore, my code ran into an issue because it called stack.parseLine(firstLineOfStack) and assumed this method would return an object. I did not realize that this method could return null. I assumed that if it could not parse a line, it would return an object where the properties are set to empty values, or perhaps throw an error.
I believe this possibility should be documented.
But thanks for the great library!
The text was updated successfully, but these errors were encountered:
This is fixed in stack-tools, which throws an error if a stack frame cannot be parsed. It can also do this more safely because unparseable stack frames are likely to be messages from nested errors, for example those produced by nested-error-stacks. stack-tools offers first class support for this, for example by allowing you to write this:
For some reason, at the top of the stack of one particular error, I have only the error message, rather than a line with a filename. Therefore, my code ran into an issue because it called
stack.parseLine(firstLineOfStack)
and assumed this method would return an object. I did not realize that this method could returnnull
. I assumed that if it could not parse a line, it would return an object where the properties are set to empty values, or perhaps throw an error.I believe this possibility should be documented.
But thanks for the great library!
The text was updated successfully, but these errors were encountered: