{"id":42291687,"url":"https://github.com/fmorenovr/gotry","last_synced_at":"2026-01-27T09:48:39.816Z","repository":{"id":57551781,"uuid":"129552432","full_name":"fmorenovr/gotry","owner":"fmorenovr","description":"GoTry is a Try/Catch/Finally library implemented in golang.","archived":false,"fork":false,"pushed_at":"2019-08-19T17:40:23.000Z","size":6,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T22:33:36.886Z","etag":null,"topics":["catch","exception-handling","exceptions","finally","go","go-exception","go-try","golang","google","gotry","try","try-catch","try-catch-finally"],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/fmorenovr/gotry","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fmorenovr.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-14T20:34:04.000Z","updated_at":"2024-06-18T22:56:45.000Z","dependencies_parsed_at":"2022-09-20T13:06:49.342Z","dependency_job_id":null,"html_url":"https://github.com/fmorenovr/gotry","commit_stats":null,"previous_names":["jenazads/gotry"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fmorenovr/gotry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmorenovr%2Fgotry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmorenovr%2Fgotry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmorenovr%2Fgotry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmorenovr%2Fgotry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fmorenovr","download_url":"https://codeload.github.com/fmorenovr/gotry/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fmorenovr%2Fgotry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28811480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["catch","exception-handling","exceptions","finally","go","go-exception","go-try","golang","google","gotry","try","try-catch","try-catch-finally"],"created_at":"2026-01-27T09:48:38.814Z","updated_at":"2026-01-27T09:48:39.808Z","avatar_url":"https://github.com/fmorenovr.png","language":"Go","readme":"# golang + Try/Catch/Finally = GoTry\n\ngoTry (Golang for Try/Catch/Finally) is a Golang implementation for Exception handling.\nYou can see an extended doc in [godocs](https://godoc.org/github.com/fmorenovr/goTry).\n\n## Try/Catch/Finally\n\nThis method is to Exception handling, in this case, when occurs a panic(), we can run a function instead that panic, maybe to solve that.  \nBut is not recommendable to use this library, because golang have an explicit error handling.  \nSee more info [here](https://golang.org/doc/effective_go.html).\n\n## goTry\n\n* First, You should download my library:\n\n      go get github.com/fmorenovr/gotry/\n\n* Then, you should use for differents implements in Go.\n        \n      gotry.Try(func() {\n        gotry.Throw(\"New exception\")\n      }).Catch(func(e gotry.Exception) {\n        // Print crash\n        fmt.Println(\"Catch ---\u003e exception catched #1:\", e)\n      }).Finally(func() {\n        fmt.Println(\"Finally ---\u003e This always print after all try block #1\")\n      })\n\n* Could be a nested Try/Catch block\n\n      gotry.Try(func() {\n        gotry.Throw(\"New exception\")\n      }).Catch(func(e gotry.Exception) {\n        // Print crash\n        fmt.Println(\"Catch ---\u003e exception catched #1:\", e)\n        gotry.Try(func(){\n          gotry.Throw(\"New exception here!!\")\n        }).Catch(func(e gotry.Exception) {\n          // Print crash\n          fmt.Println(\"Catch ---\u003e exception catched #2:\", e)\n        }).Finally(func() {\n          fmt.Println(\"Finally ---\u003e This always print after all try block #2\")\n        })\n      }).Finally(func() {\n        fmt.Println(\"Finally ---\u003e This always print after all try block #1\")\n      })\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffmorenovr%2Fgotry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffmorenovr%2Fgotry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffmorenovr%2Fgotry/lists"}