Creates an instance of the error with a specified message and invalid reason.
The error message that describes the issue.
The reason why the input is considered invalid.
This provides a programmatic way to access why parsing failed. Downstream devs might want to use this to build their own error messages if the default error messages are not suitable for their use case. This should be an enum.
Optional
stackStatic
Optional
prepareOptional override for formatting stack traces
Static
stack
This error is used to explain why parsing failed.