Documentation ¶
Overview ¶
Package eagrors contains common eago erros and related utilities
Index ¶
- func FprintStackError(l interface{ ... }, err error)
- func FprintStackTraceFromErr(w io.Writer, err error)
- func GetErrorString(err error) string
- func GetGID() uint64
- func HandleErrors(_errors ...error) error
- func NewError(errStr string) error
- func NewErrorWithCause(cause error, err string) error
- func NewProcessExitError(code int) error
- func PrintError(err error)
- func PrintStackTrace(w io.Writer)
- func PrintStackTraceFromErr(err error)
- func Recover(args ...interface{})
- func RecoverRuntime(method, url string)
- type ArgumentCountError
- type ErrorSender
- type FileError
- type ProcessExitError
- type StackError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FprintStackError ¶
func FprintStackError(l interface{ Error(...interface{}) }, err error)
FprintStackError print errors and causes to given error logger
func FprintStackTraceFromErr ¶
FprintStackTraceFromErr prints the error's stack trace to w.
func GetErrorString ¶
GetErrorString returns errors string of an error if it StackError then get all cause
func HandleErrors ¶
HandleErrors return first error which is not nil
func NewErrorWithCause ¶
NewErrorWithCause creates a stack error with given error
func PrintStackTrace ¶
PrintStackTrace prints the current stacktrace to w.
func PrintStackTraceFromErr ¶
func PrintStackTraceFromErr(err error)
PrintStackTraceFromErr prints the error's stack trace to stdout.
Types ¶
type ArgumentCountError ¶
type ArgumentCountError struct {
// contains filtered or unexported fields
}
ArgumentCountError invokes when otto function is passed by unexpected number of parameters
func NewArgumentCountError ¶
func NewArgumentCountError(want, got int) *ArgumentCountError
NewArgumentCountError :
func (ArgumentCountError) Error ¶
func (e ArgumentCountError) Error() string
type ErrorSender ¶
type ErrorSender interface {
SendError(err error)
}
ErrorSender is a, typically, non-blocking error handler.
type ProcessExitError ¶
type ProcessExitError struct {
// contains filtered or unexported fields
}
ProcessExitError invokes when error occured on JS process or process.exit function executed
func (ProcessExitError) Error ¶
func (p ProcessExitError) Error() string
type StackError ¶
type StackError interface { error // contains filtered or unexported methods }
StackError represents errors that refers another or referred from another error