package
Version:
v0.0.1
Opens a new window with list of versions in this module.
Published: Nov 20, 2023
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Throw raise panic with exception
type Block struct {
Try func()
Catch func(error)
Finally func()
}
Block {
Try: func() {
fmt.Println("Try..")
Throw("stop it")
},
Catch: func(e Exception) {
fmt.Printf("Caught %v\n", e)
},
Finally: func() {
fmt.Println("Finally..")
},
}.Do()
Block Try-Catch-Finally block struct
type Exception interface{}
Exception pass exception to Catch
Source Files
¶
Click to show internal directories.
Click to hide internal directories.