Messages from Javascript missing exception.type and .message
@mpkorstanje is already working on this.
Since Aug 10, 2025.
- Dominant language
- C#
- Stars
- 41
- Forks
- 24
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 6
Description
@davidjgoss what is the stacktrace field supposed to be? I think that between Java and Javascript we have a discrepancy. In Java the stacktrace is a string representation of the entire exception. It is formatted as:
<exception type>: <exception message>
<exception stacktrace line 1>
<exception stacktrace line 2>
Supressed exceptions:
<supressed exception 1>
<supressed exception 2>
In Javascript it seems the exception is only the stacktrace lines of the direct trace of the exception? I.e:
<exception stacktrace line 1>
<exception stacktrace line 2>
As a result the pretty formatter renders the Java stacktraces with sufficient detail. But the JS ones miss the exception.type and .message.
Note: This showed up after https://github.com/cucumber/pretty-formatter/pull/11 and probably relates to https://github.com/cucumber/messages/issues/302.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.