THRIFT-5605: Client middleware to extract exceptions
Client: go
Provide ExtractIDLExceptionClientMiddleware client middleware
implementation and ExtractExceptionFromResult to extract exceptions
defined in thrift IDL into err return so they are accessible from other
client middlewares.
diff --git a/lib/go/test/Makefile.am b/lib/go/test/Makefile.am
index 4392ebe..d938449 100644
--- a/lib/go/test/Makefile.am
+++ b/lib/go/test/Makefile.am
@@ -63,7 +63,8 @@
ConflictArgNamesTest.thrift \
ConstOptionalFieldImport.thrift \
ConstOptionalField.thrift \
- ProcessorMiddlewareTest.thrift
+ ProcessorMiddlewareTest.thrift \
+ ClientMiddlewareExceptionTest.thrift
mkdir -p gopath/src
grep -v list.*map.*list.*map $(THRIFTTEST) | grep -v 'set<Insanity>' > ThriftTest.thrift
$(THRIFT) $(THRIFTARGS) -r IncludesTest.thrift
@@ -96,6 +97,7 @@
$(THRIFT) $(THRIFTARGS) ConflictArgNamesTest.thrift
$(THRIFT) $(THRIFTARGS) -r ConstOptionalField.thrift
$(THRIFT) $(THRIFTARGS_SKIP_REMOTE) ProcessorMiddlewareTest.thrift
+ $(THRIFT) $(THRIFTARGS) ClientMiddlewareExceptionTest.thrift
ln -nfs ../../tests gopath/src/tests
cp -r ./dontexportrwtest gopath/src
touch gopath
@@ -119,7 +121,8 @@
./gopath/src/duplicateimportstest \
./gopath/src/equalstest \
./gopath/src/conflictargnamestest \
- ./gopath/src/processormiddlewaretest
+ ./gopath/src/processormiddlewaretest \
+ ./gopath/src/clientmiddlewareexceptiontest
$(GO) test -mod=mod github.com/apache/thrift/lib/go/thrift
$(GO) test -mod=mod ./gopath/src/tests ./gopath/src/dontexportrwtest
@@ -134,6 +137,7 @@
tests \
common \
BinaryKeyTest.thrift \
+ ClientMiddlewareExceptionTest.thrift \
ConflictArgNamesTest.thrift \
ConflictNamespaceServiceTest.thrift \
ConflictNamespaceTestA.thrift \