forked from netbrain/goautosocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherror.go
31 lines (25 loc) · 773 Bytes
/
error.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright © 2015 Clement 'cmc' Rey <[email protected]>.
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.
package gas
// ----------------------------------------------------------------------------
// Error is the error type of the GAS package.
//
// It implements the error interface.
type Error int
const (
// ErrMaxRetries is returned when the called function failed after the
// maximum number of allowed tries.
ErrMaxRetries Error = 0x01
)
// ----------------------------------------------------------------------------
// Error returns the error as a string.
func (e Error) Error() string {
switch e {
case ErrMaxRetries:
return "ErrMaxRetries"
default:
return "unknown error"
}
}