Skip to content

Commit

Permalink
UPDATE docs to mention ErrorReportedByStaticAnalysisTool exception
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveLiddament committed Jan 11, 2024
1 parent 8d6fff4 commit 4065c5e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/NewResultsParser.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,3 +368,12 @@ If the relative paths are not relative then use the following code for creating
new LineNumber($lineAsInt)
);
```

## Passing on errors from the static analysis tool

If the static analysis tool reports an error that means it could not run successfully, then throw the `ErrorReportedByStaticAnalysisTool` exception from the `convertFromString` method.

This will cause SARB to report the error to the user and exit with a non-zero exit code.
See the [`PhpstanJsonResultsParser`](../src/Plugins/ResultsParsers/PhpstanJsonResultsParser/PhpstanJsonResultsParser.php) for an example of this.


0 comments on commit 4065c5e

Please sign in to comment.