simon0-o commented on PR #2469: URL: https://github.com/apache/thrift/pull/2469#issuecomment-1235232391
> Another suggestion, which can be done in a follow-up PR instead, but doing it in this PR will help a lot of the test code: > > Define a `ValidationError` type in go library, and implement `Unwrap` on `tApplicationException` so that when a `TApplicationException` is validation error it can also unwrap to that, that way when checking for `ValidationError` you can use its fields to determine what's the check (e.g. `vt.const`) and what's the field that failed validation. sorry for the late reply, I have defined a `ValidationError` in application_exception.go and add a `NewValidationException` which is used to construct tApplicationExcetion with ValidationError. I also add a unwrap test in the validation test to make sure `Unwrap` works correctly. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
