exception

package
v0.0.0-...-5c92f2b Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

README

Exceptions

Exceptions are implementations of custom error types to be used in graphql services. These Error types all have a number of functions associated to them, allowing the logging or printing of different

Implementation Extension

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseException

type BaseException struct {
	// contains filtered or unexported fields
}

func NewBaseException

func NewBaseException(err error, msg string, path ast.Path, code *code.ErrorCode, source *string) *BaseException

func (*BaseException) Code

func (be *BaseException) Code() *code.ErrorCode

func (*BaseException) Err

func (be *BaseException) Err() error

func (*BaseException) Error

func (be *BaseException) Error() string

func (*BaseException) GqlError

func (be *BaseException) GqlError() *gqlerror.Error

func (*BaseException) GqlErrorWithTrace

func (be *BaseException) GqlErrorWithTrace(ctx context.Context) *gqlerror.Error

func (*BaseException) Log

func (be *BaseException) Log(ctx context.Context)

func (*BaseException) Msg

func (be *BaseException) Msg() string

func (*BaseException) Path

func (be *BaseException) Path() ast.Path

func (*BaseException) Source

func (be *BaseException) Source() string

type Exception

type Exception interface {
	Error() string
	Err() error
	Msg() string
	Path() ast.Path
	Source() string
	Code() *code.ErrorCode
	Log(ctx context.Context)
	GqlError() *gqlerror.Error
	GqlErrorWithTrace(ctx context.Context) *gqlerror.Error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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