THRIFT-5823 Fix illegal uses of exceptions as normal struct type
Patch: Jens Geyer
This closes #1928
diff --git a/lib/go/test/ClientMiddlewareExceptionTest.thrift b/lib/go/test/ClientMiddlewareExceptionTest.thrift
index 647c433..b48a611 100644
--- a/lib/go/test/ClientMiddlewareExceptionTest.thrift
+++ b/lib/go/test/ClientMiddlewareExceptionTest.thrift
@@ -25,11 +25,11 @@
// This is a special case, we want to make sure that the middleware don't
// accidentally pull result as error.
-exception FooResponse {
+struct/*exception*/ FooResponse { // returning an exception by any means other than "throws" is illegal
}
service ClientMiddlewareExceptionTest {
- FooResponse foo() throws(
+ FooResponse foo() throws( // returning an exception by any means other than "throws" is illegal
1: Exception1 error1,
2: Exception2 error2,
)