package
Version:
v0.0.0-...-e8da0a6
Opens a new window with list of versions in this module.
Published: Jul 19, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 4
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.