github.com/GeniusesGroup/libgo@v0.0.0-20220929090155-5ff932cb408e/gp/errors.go (about)

     1  /* For license and copyright information please see LEGAL file in repository */
     2  
     3  package gp
     4  
     5  import (
     6  	er "../error"
     7  	"../protocol"
     8  )
     9  
    10  const errorEnglishDomain = "Giti Network"
    11  const errorPersianDomain = "شبکه گیتی"
    12  
    13  // Errors
    14  var (
    15  	ErrPacketTooShort = er.New("urn:giti:gp.protocol:error:packet-too-short").SetDetail(protocol.LanguageEnglish, errorEnglishDomain, "Packet Too Short",
    16  		"Giti packet is empty or too short than standard header. It must include 44Byte header plus 16Byte min Payload",
    17  		"",
    18  		"").Save()
    19  
    20  	ErrPacketArrivedAnterior = er.New("urn:giti:gp.protocol:error:packet-arrived-anterior").SetDetail(protocol.LanguageEnglish, errorEnglishDomain, "Packet Arrived Anterior",
    21  		"New packet arrive before some expected packet arrived. Usually cause of drop packet detection or high latency occur for some packet",
    22  		"",
    23  		"").Save()
    24  
    25  	ErrPacketArrivedPosterior = er.New("urn:giti:gp.protocol:error:packet-arrived-posterior").SetDetail(protocol.LanguageEnglish, errorEnglishDomain, "Packet Arrived Posterior",
    26  		"New packet arrive after some expected packet arrived. Usually cause of drop packet detection or high latency occur for some packet",
    27  		"",
    28  		"").Save()
    29  )