THRIFT-727 what() method of generated exceptions will provide more information Client: Go Patch: Jens Geyer
Add-On patch to fix broken Go tutorial Project: http://git-wip-us.apache.org/repos/asf/thrift/repo Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/04fdd3a7 Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/04fdd3a7 Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/04fdd3a7 Branch: refs/heads/master Commit: 04fdd3a7ccb39cfac1c1af0951f5d3a4cc571a92 Parents: 8606271 Author: Jens Geyer <[email protected]> Authored: Wed May 20 22:35:54 2015 +0200 Committer: Jens Geyer <[email protected]> Committed: Wed May 20 22:44:55 2015 +0200 ---------------------------------------------------------------------- tutorial/go/src/handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/thrift/blob/04fdd3a7/tutorial/go/src/handler.go ---------------------------------------------------------------------- diff --git a/tutorial/go/src/handler.go b/tutorial/go/src/handler.go index fb0daef..1763832 100644 --- a/tutorial/go/src/handler.go +++ b/tutorial/go/src/handler.go @@ -59,7 +59,7 @@ func (p *CalculatorHandler) Calculate(logid int32, w *tutorial.Work) (val int32, case tutorial.Operation_DIVIDE: if w.Num2 == 0 { ouch := tutorial.NewInvalidOperation() - ouch.What = int32(w.Op) + ouch.WhatOp = int32(w.Op) ouch.Why = "Cannot divide by 0" err = ouch return @@ -68,7 +68,7 @@ func (p *CalculatorHandler) Calculate(logid int32, w *tutorial.Work) (val int32, break default: ouch := tutorial.NewInvalidOperation() - ouch.What = int32(w.Op) + ouch.WhatOp = int32(w.Op) ouch.Why = "Unknown operation" err = ouch return
