| package sample |
| |
| // A testing interface with methods that throw various types of errors |
| type ErrorThrower interface { |
| // Throws veyron2/vError.Aborted error |
| ThrowAborted() error |
| |
| // Throws veyron2/vError.BadArg error |
| ThrowBadArg() error |
| |
| // Throws veyron2/vError.BadProtocol error |
| ThrowBadProtocol() error |
| |
| // Throws veyron2/vError.Internal error |
| ThrowInternal() error |
| |
| // Throws veyron2/vError.NotAuthorized error |
| ThrowNotAuthorized() error |
| |
| // Throws veyron2/vError.NotFound error |
| ThrowNotFound() error |
| |
| // Throws veyron2/vError.Unknown error |
| ThrowUnknown() error |
| |
| // Throws normal Go error |
| ThrowGoError() error |
| |
| // Throws custom error created by using Standard |
| ThrowCustomStandardError() error |
| |
| // Lists all errors Ids available in veyron2/verror |
| ListAllBuiltInErrorIDs() ([]string, error) |
| } |