This class tracks errors and computes a summary of information like:
- where the errors happened
- what the error names are
- what the error codes are
- what is the general error message
This is extremely useful when there are dynamic error messages, such as argument validation.
Since the structure of the
tracker.result object differs when using different options,
it's typed as
Record<string, unknown>. The most deep object has a
count property, which is a number.
It's possible to get the total amount of errors via the
Returns [number, string]