gocql.go 468 B

123456789101112131415161718192021222324
  1. // Copyright (c) 2012 The gocql Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package gocql
  5. import (
  6. "errors"
  7. )
  8. type Error struct {
  9. Code int
  10. Message string
  11. }
  12. func (e Error) Error() string {
  13. return e.Message
  14. }
  15. var (
  16. ErrNotFound = errors.New("not found")
  17. ErrNoHostAvailable = errors.New("no host available")
  18. ErrProtocol = errors.New("protocol error")
  19. )