THRIFT-2343 Fix tutotial code and codegen for methods without exceptions
Patch: Jens Geyer
diff --git a/tutorial/go/src/client.go b/tutorial/go/src/client.go
index 543d7fb..31376f8 100644
--- a/tutorial/go/src/client.go
+++ b/tutorial/go/src/client.go
@@ -20,10 +20,10 @@
*/
import (
+ "crypto/tls"
"fmt"
"git.apache.org/thrift.git/lib/go/thrift"
"tutorial"
- "crypto/tls"
)
func handleClient(client *tutorial.CalculatorClient) (err error) {
@@ -37,12 +37,12 @@
work.Op = tutorial.Operation_DIVIDE
work.Num1 = 1
work.Num2 = 0
- quotient, ouch, err := client.Calculate(1, work)
+ quotient, err := client.Calculate(1, work)
if err != nil {
fmt.Println("Error during operation:", err)
return err
- } else if ouch != nil {
- fmt.Println("Invalid operation:", ouch)
+ //} else if ouch != nil {
+ // fmt.Println("Invalid operation:", ouch)
} else {
fmt.Println("Whoa we can divide by 0 with new value:", quotient)
}
@@ -50,12 +50,12 @@
work.Op = tutorial.Operation_SUBTRACT
work.Num1 = 15
work.Num2 = 10
- diff, ouch, err := client.Calculate(1, work)
+ diff, err := client.Calculate(1, work)
if err != nil {
fmt.Println("Error during operation:", err)
return err
- } else if ouch != nil {
- fmt.Println("Invalid operation:", ouch)
+ //} else if ouch != nil {
+ // fmt.Println("Invalid operation:", ouch)
} else {
fmt.Print("15-10=", diff, "\n")
}