Re: [go-nuts] Is this an acceptable way to handle errors

2016-08-08 Thread GoNutter
Thanks Lance. On Saturday, August 6, 2016 at 4:43:02 PM UTC+1, Ian Lance Taylor wrote: > > On Sat, Aug 6, 2016 at 5:50 AM, GoNutter > wrote: > > > > I have a number of cases where I have to handle typed errors. I have > been > > doing this previoiusly &

[go-nuts] Is this an acceptable way to handle errors

2016-08-06 Thread GoNutter
Hi, I have a number of cases where I have to handle typed errors. I have been doing this previoiusly err :=SomeFunctionCall() if err != nil{ switch e := err.(type){ case sometype: //do something case someothertype: //do something else default: //do default }