-
Notifications
You must be signed in to change notification settings - Fork 1
/
errors.go
16 lines (14 loc) · 903 Bytes
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package ferstream
import "errors"
var (
// ErrBadUnmarshalResult given when unmarshal result from a message's Data is not as intended
ErrBadUnmarshalResult = errors.New("ferstreamErr: bad unmarshal result")
// ErrCastingPayloadToStruct given when unmarshal result from a message's Data is not as intended
ErrCastingPayloadToStruct = errors.New("ferstreamErr: failed to cast payload to specified struct")
// ErrGiveUpProcessingMessagePayload given when message's payload(data) is already processed x times, but always failed
ErrGiveUpProcessingMessagePayload = errors.New("ferstreamErr: give up processing message payload")
// ErrNilMessagePayload given when message's payload(data) is nil
ErrNilMessagePayload = errors.New("ferstreamErr: nil message payload given")
// ErrConnectionLost given when no active nats connection
ErrConnectionLost = errors.New("ferstreamErr: connection error")
)