diff options
| author | Andrew Gallant (Ocelot) <[email protected]> | 2012-05-10 12:47:19 -0400 |
|---|---|---|
| committer | Andrew Gallant (Ocelot) <[email protected]> | 2012-05-10 12:47:19 -0400 |
| commit | b10760ea62c5c071496a71d1d9ab6752989a309f (patch) | |
| tree | 5988ea2cfd75375e0b7b8395b4f67b7fbf25c86a /xgbgen/go_error.go | |
| parent | e73b778be590baf0a3944e1e4c95f10eaedf275d (diff) | |
make resource ids their own individual types. last commit before overhaul to sub-packages
Diffstat (limited to 'xgbgen/go_error.go')
| -rw-r--r-- | xgbgen/go_error.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/xgbgen/go_error.go b/xgbgen/go_error.go index c96866c..f4577ef 100644 --- a/xgbgen/go_error.go +++ b/xgbgen/go_error.go @@ -68,9 +68,9 @@ func (e *Error) ImplementsError(c *Context) { c.Putln("return err.Sequence") c.Putln("}") c.Putln("") - c.Putln("func (err %s) BadId() Id {", e.ErrType()) + c.Putln("func (err %s) BadId() uint32 {", e.ErrType()) if !c.protocol.isExt() { - c.Putln("return Id(err.BadValue)") + c.Putln("return err.BadValue") } else { c.Putln("return 0") } @@ -128,8 +128,12 @@ func (e *ErrorCopy) ImplementsError(c *Context) { c.Putln("return err.Sequence") c.Putln("}") c.Putln("") - c.Putln("func (err %s) BadId() Id {", e.ErrType()) - c.Putln("return Id(err.BadValue)") + c.Putln("func (err %s) BadId() uint32 {", e.ErrType()) + if !c.protocol.isExt() { + c.Putln("return err.BadValue") + } else { + c.Putln("return 0") + } c.Putln("}") c.Putln("") c.Putln("func (err %s) Error() string {", e.ErrType()) |
