try

package
v0.0.0-...-e0ee87b Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(expr bool, message string)

func EosAssert

func EosAssert(expr bool, exception Exception, format string, args ...interface{})

func EosThrow

func EosThrow(exception Exception, format string, args ...interface{})

func FcAssert

func FcAssert(test bool, args ...interface{})

func FcFormatArgParams

func FcFormatArgParams(args []interface{}) (string, []interface{})

func FcRethrowException

func FcRethrowException(er Exception, logLevel Lvl, format string, args ...interface{})

func FcThrow

func FcThrow(format string, args ...interface{})

func Throw

func Throw(e interface{})

Types

type CatchOrFinally

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

func Try

func Try(f func()) (r *CatchOrFinally)

Try call the function. And return interface that can call Catch or Finally.

func (*CatchOrFinally) Catch

func (c *CatchOrFinally) Catch(f interface{}) (r *CatchOrFinally)

Catch call the exception handler. And return interface CatchOrFinally that can call Catch or Finally.

func (*CatchOrFinally) CatchAndCall

func (c *CatchOrFinally) CatchAndCall(Next func(interface{})) *CatchOrFinally

func (*CatchOrFinally) End

func (c *CatchOrFinally) End() *CatchOrFinally

Necessary to call at the end of try-catch block, to ensure panic uncaught exceptions

func (*CatchOrFinally) EosRethrowExceptions

func (c *CatchOrFinally) EosRethrowExceptions(exception Exception, format string, args ...interface{}) *CatchOrFinally

noinspection GoStructInitializationWithoutFieldNames

func (*CatchOrFinally) FcCaptureAndLog

func (c *CatchOrFinally) FcCaptureAndLog(args ...interface{}) *CatchOrFinally

func (*CatchOrFinally) FcCaptureAndRethrow

func (c *CatchOrFinally) FcCaptureAndRethrow(args ...interface{}) *CatchOrFinally

func (*CatchOrFinally) FcCaptureLogAndRethrow

func (c *CatchOrFinally) FcCaptureLogAndRethrow(args ...interface{}) *CatchOrFinally

func (*CatchOrFinally) FcLogAndDrop

func (c *CatchOrFinally) FcLogAndDrop(args ...interface{}) *CatchOrFinally

func (*CatchOrFinally) FcLogAndRethrow

func (c *CatchOrFinally) FcLogAndRethrow() *CatchOrFinally

func (*CatchOrFinally) FcRethrowExceptions

func (c *CatchOrFinally) FcRethrowExceptions(logLevel Lvl, format string, args ...interface{}) *CatchOrFinally

Jump to

Keyboard shortcuts

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