github.com/gdamore/mangos@v1.4.0/errors.go (about)

     1  // Copyright 2015 The Mangos Authors
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use file except in compliance with the License.
     5  // You may obtain a copy of the license at
     6  //
     7  //    http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package mangos
    16  
    17  import (
    18  	"errors"
    19  )
    20  
    21  // Various error codes.
    22  var (
    23  	ErrBadAddr     = errors.New("invalid address")
    24  	ErrBadHeader   = errors.New("invalid header received")
    25  	ErrBadVersion  = errors.New("invalid protocol version")
    26  	ErrTooShort    = errors.New("message is too short")
    27  	ErrTooLong     = errors.New("message is too long")
    28  	ErrClosed      = errors.New("connection closed")
    29  	ErrConnRefused = errors.New("connection refused")
    30  	ErrSendTimeout = errors.New("send time out")
    31  	ErrRecvTimeout = errors.New("receive time out")
    32  	ErrProtoState  = errors.New("incorrect protocol state")
    33  	ErrProtoOp     = errors.New("invalid operation for protocol")
    34  	ErrBadTran     = errors.New("invalid or unsupported transport")
    35  	ErrBadProto    = errors.New("invalid or unsupported protocol")
    36  	ErrPipeFull    = errors.New("pipe full")
    37  	ErrPipeEmpty   = errors.New("pipe empty")
    38  	ErrBadOption   = errors.New("invalid or unsupported option")
    39  	ErrBadValue    = errors.New("invalid option value")
    40  	ErrGarbled     = errors.New("message garbled")
    41  	ErrAddrInUse   = errors.New("address in use")
    42  	ErrBadProperty = errors.New("invalid property name")
    43  	ErrTLSNoConfig = errors.New("missing TLS configuration")
    44  	ErrTLSNoCert   = errors.New("missing TLS certificates")
    45  )