exception

package
v1.1.90 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Throw

func Throw(err error)

Throw - raises the error Raises the panic error

Types

type Block

type Block struct {
	Try     func()
	Catch   func(error)
	Finally func()
}

Block - defines the try, catch and finally code blocks

func (Block) Do

func (block Block) Do()

Do - Executes the Exception block. 1. Defers the finally method, so that it can be called last 2. Defers the execution of catch, to recover from panic raised by Throw and callback Catch method 3. Executes the try method, that may raise error by calling Throw method

Jump to

Keyboard shortcuts

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