Skip to content

gomodul/fn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fn

Try-Catch-Finally

package main

import "github.com/gomodul/fn"

func main() {
	fn.Block{
		Try: func() {
			// try to run function...

			// throw exception where not null...
			fn.Throw()
		},
		Catch: func(e fn.Exception) {
			// catch exception from throw function...
		},
		Finally: func() {
			// optional...
		},
	}.Do()
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages