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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
// Tideland Go Library - Redis Client - Errors
//
// Copyright (C) 2009-2017 Frank Mueller / Oldenburg / Germany
//
// All rights reserved. Use of this source code is governed
// by the new BSD license.
package redis
//--------------------
// IMPORTS
//--------------------
import (
"github.com/tideland/golib/errors"
)
//--------------------
// CONSTANTS
//--------------------
// Error codes.
const (
ErrInvalidConfiguration = iota
ErrPoolLimitReached
ErrConnectionEstablishing
ErrConnectionBroken
ErrInvalidResponse
ErrServerResponse
ErrTimeout
ErrAuthenticate
ErrSelectDatabase
ErrUseSubscription
ErrInvalidType
ErrInvalidKey
ErrIllegalItemIndex
ErrIllegalItemType
)
var errorMessages = errors.Messages{
ErrInvalidConfiguration: "invalid configuration value in field %q: %v",
ErrPoolLimitReached: "connection pool limit (%d) reached",
ErrConnectionEstablishing: "cannot establish connection",
ErrConnectionBroken: "cannot %s, connection is broken",
ErrInvalidResponse: "invalid server response: %q",
ErrServerResponse: "server responded error: %v",
ErrTimeout: "timeout waiting for response",
ErrAuthenticate: "cannot authenticate",
ErrSelectDatabase: "cannot select database",
ErrUseSubscription: "use subscription type for subscriptions",
ErrInvalidType: "invalid type conversion of \"%v\" to %q",
ErrInvalidKey: "invalid key %q",
ErrIllegalItemIndex: "item index %d is illegal for result set size %d",
ErrIllegalItemType: "item at index %d is no %s",
}
// EOF
|