{"id":20736863,"url":"https://github.com/karenpayneoregon/exception-handler","last_synced_at":"2026-03-11T13:39:56.493Z","repository":{"id":110840588,"uuid":"335985093","full_name":"karenpayneoregon/exception-handler","owner":"karenpayneoregon","description":"Provides an easy way to handle unhandled exceptions in a Windows Form application","archived":false,"fork":false,"pushed_at":"2021-05-23T15:45:26.000Z","size":1000,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-27T13:31:44.505Z","etag":null,"topics":["csharp-code","csharp-core","csharp-library","unhandled-exception-handler","unhandled-exceptions","visual-studio"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karenpayneoregon.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-04T14:48:25.000Z","updated_at":"2023-07-31T18:30:43.000Z","dependencies_parsed_at":"2023-06-09T10:30:09.552Z","dependency_job_id":null,"html_url":"https://github.com/karenpayneoregon/exception-handler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/karenpayneoregon/exception-handler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2Fexception-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2Fexception-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2Fexception-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2Fexception-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karenpayneoregon","download_url":"https://codeload.github.com/karenpayneoregon/exception-handler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karenpayneoregon%2Fexception-handler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30382674,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T12:49:11.341Z","status":"ssl_error","status_checked_at":"2026-03-11T12:46:41.342Z","response_time":84,"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":["csharp-code","csharp-core","csharp-library","unhandled-exception-handler","unhandled-exceptions","visual-studio"],"created_at":"2024-11-17T06:12:09.484Z","updated_at":"2026-03-11T13:39:56.478Z","avatar_url":"https://github.com/karenpayneoregon.png","language":"C#","readme":"# About\n\n\n\nSource and code sample for [KP.ExceptionHandling NuGet package](https://www.nuget.org/packages/KP.ExceptionHandling/).\n\n![screen](assets/nugetpackage1.png)\n\n\n![screen1](assets/Versions.png)\n\n### Microsoft TechNet article\nhttps://social.technet.microsoft.com/wiki/contents/articles/54209.unhandled-runtime-exceptions-window-forms-c.aspx\n\n### Log viewer\n\n![screen](assets/LogViewer.png)\n\n###  Example \n\n- Add the above package\n- Modifiy code for OnProcessingCompletedEvent \n\n```csharp\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\nusing ExceptionHandling;\n\nnamespace KP_ExceptionPackageTest\n{\n    static class Program\n    {\n        /// \u003csummary\u003e\n        ///  The main entry point for the application.\n        /// \u003c/summary\u003e\n        [STAThread]\n        static void Main()\n        {\n\n            Application.SetHighDpiMode(HighDpiMode.SystemAware);\n            Application.EnableVisualStyles();\n            Application.SetCompatibleTextRenderingDefault(false);\n\n            // Handling UI thread exceptions to the event.\n            Application.ThreadException += UnhandledExceptions.Application_ThreadException;\n\n            // For handling non-UI thread exceptions to the event. \n            AppDomain.CurrentDomain.UnhandledException +=\n                UnhandledExceptions.CurrentDomain_UnhandledException;\n\n            // Indicates capturing exception has completed\n            UnhandledExceptions.OnProcessingCompletedEvent += OnProcessingCompletedEvent;\n\n            // TODO Change this to your startup form\n            Application.Run(new Form1());\n        }\n\n        private static void OnProcessingCompletedEvent()\n        {\n            var f = new AppErrorForm { Text = @\"Your title goes here\" };\n            f.ShowDialog();\n            Application.Exit();\n        }\n    }\n}\n\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarenpayneoregon%2Fexception-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarenpayneoregon%2Fexception-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarenpayneoregon%2Fexception-handler/lists"}