log

package
v0.0.0-...-e5b6a84 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorCodeMap = map[ErrorCode]string{
	InternalError:   "An internal error occurred in the IBM RMF Datasource plugin. Please contact your administrator and check the logs.",
	FrameError:      "Unable to fetch data from server.",
	InputError:      "The input provided is invalid.",
	ConnectionError: "DDS connection failed.",
}

Functions

func ErrorWithId

func ErrorWithId(logger log.Logger, errCode ErrorCode, msg string, args ...interface{}) error

ErrorWithId logs an error with a unique id and returns a message with the same code. The message is passed to frontend; the id can be used to identify corresponding backend error.

func FrameErrorWithId

func FrameErrorWithId(logger log.Logger, err error) error

func LogAndRecover

func LogAndRecover(logger log.Logger)

Types

type ErrorCode

type ErrorCode int
const (
	InternalError ErrorCode = iota
	FrameError
	InputError
	ConnectionError
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL