Documentation ¶
Index ¶
- Constants
- func CheckErr(logWr *myLogger.Logger, err *errors.Error, logFields myLogger.Fields, ...)
- func CheckErrAlreadyStack(logWr *myLogger.Logger, err error, logFields myLogger.Fields, msg string, ...)
- func CheckErrNoExtraMsg(logWr *myLogger.Logger, err *errors.Error, logFields myLogger.Fields, ...)
- func CheckErrNoExtraMsgAlreadyStack(logWr *myLogger.Logger, err error, logFields myLogger.Fields, ifExt bool)
- func CreateErrorWithStack(err error) error
- func CreateMsgWithStack(msg string) string
- func CreateStrErrorWithStack(msg string) error
- func PanicWithExtraMsg(err error, fields map[string]interface{}, msg string)
- func WithStackError(err error) error
- func WriteLogAndPanic(logWr *myLogger.Logger, err *errors.Error, logFields myLogger.Fields, ...)
- func WriteLogAndPanicAlreadyStack(logWr *myLogger.Logger, err error, logFields myLogger.Fields, extraMsg string)
Constants ¶
View Source
const ( NAME_ERRCODE = "errcode" NAME_MSG = "errmsg" NAME_EXT_MSG = "extramsg" NAME_STACKTRACE = "stacktrace" ERR_OK = 0 ERR_WARNING = 1 ERR_ERROR = 2 ERR_INTERFACE_CONVERT = 3 ERR_MAP_KEY_NOT_EXISTS = 4 ERR_PROGRAM_ALREAD_RUNNING = 6 ERR_INVALID_OPTION = 11 ERR_MISSING_OPTION = 12 ERR_OPTION_MISMATCH = 13 ERR_OPTION_OUTRANGE = 14 ERR_DIR_NOT_EXISTS = 15 ERR_NUMBER_PARSE = 16 ERR_NOT_BINLOG = 101 ERR_BINLOG_EVENT = 102 ERR_BINEVENT_HEADER = 103 ERR_BINEVENT_BODY = 104 ERR_FALCONTAG_CANNOT_GET_TAG = 201 ERR_HTTP_SERVER_START = 300 ERR_HTTP_SERVER_SHUTDOWN = 301 ERR_HTTP_MISSING_PARAMS = 305 ERR_HTTP_INCOMPLET_RESULT = 306 ERR_HTTP_NO_RESULT = 306 ERR_VIPER_UNMARSHAL = 401 ERR_MYSQL = 501 ERR_MYSQL_REPL = 502 ERR_MYSQL_CONNECTION = 503 ERR_MYSQL_QUERY = 504 ERR_JSON_MARSHAL = 601 ERR_JSON_UNMARSHAL = 602 ERR_JSON_DUMP_FILE = 603 ERR_JSON_FROM_FILE = 604 ERR_NO_VALUE = 650 ERR_FILE_NOT_EXISTS = 701 ERR_FILE_OPEN = 702 ERR_FILE_READ = 703 ERR_FILE_WRITE = 704 ERR_FILE_SEEK = 705 ERR_FILE_REMOVE = 706 ERR_FILE_RENAME = 707 ERR_DIR_GETCWD = 108 ERR_REG_COMPILE = 801 ERR_REDIS_CONNECT = 901 ERR_REDIS_SCAN = 902 ERR_REDIS_INFO = 903 ERR_REDIS_CLUSTER_NODES = 904 ERR_REDIS_REPLICATE_STOP = 905 ERR_REDIS_GET_KEY_VALUE = 906 ERR_REDIS_EXPIRE = 907 ERR_REDIS_CONFIG_GET = 908 ERR_REDIS_CONFIG_SET = 908 ERR_REDIS_SET = 909 ERR_REDIS_TYPE = 910 ERR_REDIS_DELETE = 911 ERR_HTTP_GET = 1001 ERR_HTTP_POST = 1002 ERR_TAG_GET = 1100 ERR_TAG_API_ERRCODE = 1101 ERR_TAG_API_DATA_EMPTY = 1102 ERR_TAG_API_MISSING_HOST = 1103 ERR_SHELL_CMD = 1200 ERR_DISCOVER_IPS = 1201 ERR_DISCOVER_REDIS = 1202 ERR_DISCOVER_MEMCACHE = 1203 ERR_DISCOVER_TWEMPROXY = 1204 ERR_DISCOVER_PIKA = 1205 ERR_DISCOVER_MYSQL = 1206 ERR_DISCOVER_PORTS = 1220 ERR_DISCOVER_PID = 1221 ERR_PROCESS_METRICS = 1222 ERR_PARSE_INT = 1300 ERR_PARSE_FLOAD = 1301 ERR_MEMCACHE_CONNECT = 1401 ERR_MEMCACHE_STATS = 1402 ERR_OS_PID = 1501 ERR_TWEMPROXY_CONNECT = 1600 ERR_TWEMPROXY_STATUS = 1601 ERR_TWEMPROXY_PING = 1602 ERR_KAFKA_CONNECT = 1700 ERR_KAFKA_PARTITION = 1701 ERR_KAFKA_CLOSE = 1702 ERR_KAFKA_CONSUMER = 1703 )
Variables ¶
This section is empty.
Functions ¶
func CheckErrAlreadyStack ¶
func CheckErrNoExtraMsg ¶
func CreateErrorWithStack ¶
func CreateMsgWithStack ¶
func CreateStrErrorWithStack ¶
func PanicWithExtraMsg ¶
func WithStackError ¶
func WriteLogAndPanic ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.