forked from rollbar/rollbar-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.go
32 lines (25 loc) · 970 Bytes
/
errors.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
32
package rollbar
import (
"fmt"
)
// ErrHTTPError is an HTTP error status code as defined by
// http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
type ErrHTTPError int
// Error implements the error interface.
func (e ErrHTTPError) Error() string {
return fmt.Sprintf("rollbar: service returned status: %d", e)
}
// ErrBufferFull is an error which is returned when the asynchronous transport is used and the
// channel used for buffering items for sending to Rollbar is full.
type ErrBufferFull struct{}
// Error implements the error interface.
func (e ErrBufferFull) Error() string {
return "buffer full, dropping error on the floor"
}
// ErrChannelClosed is an error which is returned when the asynchronous transport is used and the
// channel used for buffering items for sending to Rollbar is already closed
type ErrChannelClosed struct{}
// Error implements the error interface.
func (e ErrChannelClosed) Error() string {
return "channel is closed"
}