github.com/geniusesgroup/libgo@v0.0.0-20220713101832-828057a9d3d4/convert/errors.go (about) 1 /* For license and copyright information please see LEGAL file in repository */ 2 3 package convert 4 5 import ( 6 er "../error" 7 "../protocol" 8 ) 9 10 const domainEnglish = "Convert" 11 const domainPersian = "تبدیل" 12 13 // Errors 14 var ( 15 ErrEmptyValue = er.New("urn:giti:convert.protocol:error:empty-value").SetDetail(protocol.LanguageEnglish, domainEnglish, "Empty Value", 16 "Empty value pass to convert function that it is illegal", 17 "", 18 "").Save() 19 20 ErrValueOutOfRange = er.New("urn:giti:convert.protocol:error:value out of range").SetDetail(protocol.LanguageEnglish, domainEnglish, "Value Out of Range", 21 "indicates that a value is out of range for the target type, e.g. 270 for uint8", 22 "", 23 "").Save() 24 25 ErrBadValue = er.New("urn:giti:convert.protocol:error:bad-value").SetDetail(protocol.LanguageEnglish, domainEnglish, "Bad Value", 26 "Bad value pass to convert function that it is illegal e.g. pass '1b2' to convert to number", 27 "", 28 "").Save() 29 )