Figure out how to avoid adding skippedString that isn’t helpful
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 250
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
Some messages that get reported have a skippedString appended that isn’t useful; for example:
Value Error : background top is not a color value )
The ) at the end of that message is skippedString text that gets appended in the case of an exception thrown from CssImage class when a malformed linear-gradient function is encountered.
But for pretty much all the exceptions that get thrown from the CssImage class, that not-helpful ) gets appended to the message.
We should figure out some way to audit what kinds of other cases also produce that sort of not-helpful skippedString text, and then see if it’s possible to come up with some general mechanism to prevent skippedString text from getting set on the error object to begin with in those cases.
One mechanism that could be considered using .getStackTrace()[0].getClassName() to check what class a particular exception was thrown from, and then avoiding to add the skippedString text for all exceptions thrown from that class — if it’s known that the skippedString text is unhelpful in all cases or exceptions thrown from that class.
But if some exceptions thrown from a particular class result in helpful skippedString text while other exceptions from that class don’t, then something more granular would be needed.
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.
Research direction
Start by tracing where skippedString is assigned to errors raised from the CssImage class, using getStackTrace()[0].getClassName() only as an investigation aid. Audit the other cases that append unhelpful text and determine whether helpful and unhelpful cases can be distinguished. Done means unhelpful suffixes are excluded while useful skippedString text remains available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100