{"id":18982780,"url":"https://github.com/bezzad/errorcontrolsystem","last_synced_at":"2026-02-21T10:02:43.946Z","repository":{"id":29323583,"uuid":"32857128","full_name":"bezzad/ErrorControlSystem","owner":"bezzad","description":"ErrorControlSystem is a .NET library created to automate handling .NET Windows-Base application exceptions and raise that to a sql server. This exception handler have some features as screen capturing, fetch server date time in exception occurrence time and etc.","archived":false,"fork":false,"pushed_at":"2019-08-04T08:53:40.000Z","size":19111,"stargazers_count":32,"open_issues_count":12,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-19T21:10:56.998Z","etag":null,"topics":["crash-reporter","dotnet","error","error-handler","error-reporter","exception-handler","exception-reporter","reporter","sql-server","winform","wpf","wpf-crash-reporter"],"latest_commit_sha":null,"homepage":"http://bezzad.github.io/ErrorControlSystem/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bezzad.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2015-03-25T10:13:56.000Z","updated_at":"2024-05-03T17:30:15.000Z","dependencies_parsed_at":"2022-09-16T11:30:55.397Z","dependency_job_id":null,"html_url":"https://github.com/bezzad/ErrorControlSystem","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/bezzad/ErrorControlSystem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezzad%2FErrorControlSystem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezzad%2FErrorControlSystem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezzad%2FErrorControlSystem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezzad%2FErrorControlSystem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bezzad","download_url":"https://codeload.github.com/bezzad/ErrorControlSystem/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezzad%2FErrorControlSystem/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29679049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T09:33:50.764Z","status":"ssl_error","status_checked_at":"2026-02-21T09:33:19.949Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["crash-reporter","dotnet","error","error-handler","error-reporter","exception-handler","exception-reporter","reporter","sql-server","winform","wpf","wpf-crash-reporter"],"created_at":"2024-11-08T16:14:40.023Z","updated_at":"2026-02-21T10:02:43.928Z","avatar_url":"https://github.com/bezzad.png","language":"C#","readme":"# [Error Control System](https://github.com/bezzad/ErrorControlSystem) #\n---------------------\n[![Build status](https://ci.appveyor.com/api/projects/status/lnjusej10c0451xw?svg=true)](https://ci.appveyor.com/project/bezzad/errorcontrolsystem)\n[![Nuget count](http://img.shields.io/nuget/v/errorcontrolsystem.svg)](https://www.nuget.org/packages/errorcontrolsystem/)\n[![Nuget downloads](http://img.shields.io/nuget/dt/errorcontrolsystem.svg)](https://www.nuget.org/packages/errorcontrolsystem/)\n[![Issues open](http://img.shields.io/github/issues-raw/bezzad/ErrorControlSystem.svg)](https://huboard.com/bezzad/ErrorControlSystem)\n[![Source Browser](https://img.shields.io/badge/Browse-Source-green.svg)](http://sourcebrowser.io/Browse/bezzad/ErrorControlSystem)\n\nCheck the official [project site](http://bezzad.github.io/ErrorControlSystem/). There you will find information on how to contribute, our task board, definition of done, definition of ready, etc.\n\n[![Error Control System.png](https://raw.githubusercontent.com/bezzad/ErrorControlSystem/master/src/Documentation/Readme/images/Error%20Control%20System.png)](https://www.nuget.org/packages/ErrorControlSystem)\n\n\n---------------------\n### What Is This?\n\nThis is a C#.Net project's for manage __Exceptions__ of your .Net applications by handling and \nlogging that. This is a .dll modules to provide error handling worker on your app background's.\nThe modules strive to be simple, well documented and\nmodification friendly, in order to help developers quickly learn their inner\nworkings.\n\nNOTE: \n\u003e     This program is only for exception handling of \n\u003e     Windows-based applications (WinForms, WPF, Console)\n\u003e     that are written by .NET languages such as C#, VB.NET, Visual F#\n\n\n--------------------------------\n### How To Use The Examples\n\nTo interact with this project, at first find main class of your project to \nadd this module. Then, at the beginning of the instructions before any other \nuser codes, enter the following command to invoke and run the module.\n\nThis is initialize codes of the module in `C# language` windows applications:\n \n```C#\n\nusing System;\nusing System.Windows.Forms;\nusing ErrorControlSystem;\nusing ErrorControlSystem.Shared;\n\nnamespace TestApplication\n{\n    static class Program\n    {\n        [STAThread]\n        private static void Main()\n        {\n\t\t\t//\n            // ------------------ Initial Error Control System --------------------------------\n            //\n            ExceptionHandler.Engine.Start(\"localhost\", \"UsersManagements\",\n                ErrorHandlingOptions.Default \u0026\n                   ~ErrorHandlingOptions.ResizeSnapshots);\n            \n            // Or Set Option this way:\n            ErrorHandlingOption.ResizeSnapshots = false;\n            ErrorHandlingOption.ReportHandledExceptions = false;\n            ErrorHandlingOption.LogOnTheFly = true; // Log errors without caching\n\n            //\n            // Some of the optional configuration items.\n            //\n            // Except 'NotImplementedException' from raise log\n            ExceptionHandler.Filter.ExemptedExceptionTypes.Add(typeof(NotImplementedException));\n\n            // Filter 'Exception' type from Snapshot capturing \n            ExceptionHandler.Filter.NonSnapshotExceptionTypes.Add(typeof(FormatException));\n\n            // Add extra data for labeling exceptions\n            ExceptionHandler.Filter.AttachExtraData.Add(\"WinForms\", \"beta version\");\n\n            // Filter a method of a specific class in my assembly \n\t\t\t// from raise unhanded exceptions log\n            ExceptionHandler.Filter.ExemptedCodeScopes.Add(\n                new CodeScope(\"Assembly\", \"Namespace\", \"Class\", \"Method\"));\n\n            // Do not raise any exception in other code places.\n            ExceptionHandler.Filter.JustRaiseErrorCodeScopes.Add(\n                new CodeScope(\"Assembly\", \"Namespace\", \"Class\", \"Method\"));\n\t\t\t//\n            // Show unhandled exception message customized mode. \n            ExceptionHandler.OnShowUnhandledError += AlertUnhandledErrors;\n            //\n            // ----------------------------------------------------------------------------\n            //\n\n\t\t\tApplication.EnableVisualStyles();\n            Application.SetCompatibleTextRenderingDefault(false);\n            Application.Run(new FormTest());\n        }\n\n\t\t/// \u003csummary\u003e\n        /// Show unhandled exception message customized mode.\n        /// \u003c/summary\u003e\n        /// \u003cparam name=\"sender\"\u003eRaw exception object\u003c/param\u003e\n        /// \u003cparam name=\"e\"\u003eCompiled error object\u003c/param\u003e\n        public static void AlertUnhandledErrors(object sender, UnhandledErrorEventArgs e)\n        {\n            MessageBox.Show(e.ErrorObject.Message);\n        }\n    }\n}\n```\n\nIn VB.NET applications, open the solution window and select `My Project` \nthen click on __Show All Files__ and go on this path:\n\n* My Project\n    * Application.myapp\n\t    * Application.Designer.vb  --\u003e (open this file)\n\nAdd Startup events at this file, same below codes:\n\n```VB\n\nPartial Friend Class MyApplication\n        \n        \u003cGlobal.System.Diagnostics.DebuggerStepThroughAttribute()\u003e  _\n        Public Sub New()\n            MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)\n            Me.IsSingleInstance = True\n            Me.EnableVisualStyles = True\n            Me.SaveMySettingsOnExit = True\n            Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses\n        End Sub\n\n        \u003cGlobal.System.Diagnostics.DebuggerStepThroughAttribute()\u003e _\n        Protected Overrides Sub OnCreateMainForm()\n            Me.MainForm = Global.ErrorControlSystem.Examples.VisualBasicWinForms.Form1\n        End Sub\n\n\n        Private Sub MyApplication_Startup(sender As Object, e As ApplicationServices.StartupEventArgs) Handles Me.Startup\n            ' ------------------ Initial Error Control System --------------------------------\n            ExceptionHandler.Engine.Start(\"localhost\", \"UsersManagements\")\n            ' ---------------------------------------------------------------------------------\n        End Sub\n    End Class\n```\n\nOr create a Sub Main method like MainModule.vb, for this change must be to go on the Project Designer (go to Project \nProperties or double-click the My Project node in Solution Explorer) and then after shown properties form, uncheck \nthe `Enable Application Framework` option on the Application tab, and at last change the __Startup object__ to `Sub Main`.\n\n\n--------------------------------\n### Settings\n\nIn the initialize code snippet you've seen that, for the `ExceptionHandler.Engine` method should be an option. \nThis option is used to specify the error data, which includes the following values:\n\n* None\n* DisplayUnhandledExceptions\n* ReportHandledExceptions\n* Snapshot\n* FetchServerDateTime\n* ResizeSnapshots\n* EnableNetworkSending\n* FilterExceptions\n* ExitApplicationImmediately\n* HandleProcessCorruptedStateExceptions\n* DisplayDeveloperUI\n* LogOnTheFly\n* All\n* Default = All - (ExitApplicationImmediately, HandleProcessCorruptedStateExceptions)\n\nFor example in above codes, this code means is:\n\n```C#\nExceptionHandler.Engine.Start(\"localhost\", \"UsersManagements\",\n                ErrorHandlingOptions.Default \u0026 ~ErrorHandlingOptions.ResizeSnapshots);\n```\nSelect all options by excepted `ResizeSnapshots`\n\nBy adding the our module starter code to the beginning of your program code, you can raise all exceptions history, including __Handled__ or __UnHandled__ exceptions on the your database.\n\nNote:\n\u003e     In the new version 2.1.1.0 and later, the option set in from database at runtime, \n\u003e     and not necessary to set that from initial  Start  method\n\n\n--------------------------\n### How To Install The Modules\n\n1. Install examples for developers (unpacking it to your disk, and go to\n\\ErrorControlSystem\\out\\ErrorControlSystem\\... directory if you're installing by hand, for example).\n\n Note:\n\u003e      If there is not any file in the out folders, \n\u003e      run the buildx86.bat (or buildx64 on 64bit Operation System) file \n\u003e      to compile project and create executable files.\n\u003e      Or \n\u003e      please open project .sln file on Visual Studio 2013 \n\u003e      and debug/release that to compile native files.\n\n\n2. In your project reference add this module dll file:  \n   References \u003e Add Reference... \u003e Browse to above path \u003e Select ErrorControlSystem.dll\n\n3. Rebuild access permissions if you are prompted to.\n\nNow you can read the code and its comments and see the result, experiment with\nit, and hopefully quickly grasp how things work.\n\nIf you find a problem, incorrect comment, obsolete or improper code or such,\nplease search for an issue about it at [ECS Issue](https://github.com/bezzad/ErrorControlSystem/issues)\nIf there isn't already an issue for it, please create a new one.\n\n\n--------------------------\n### Creating SQL Server Database Manually\n\nThe `ErrorControlSystem` project used from __UsersManagements __ database. So that is necessary for run this application.\nFor Creating __UsersManagements__ database on your server or pc do below steps:\n\nNote:\n\u003e     In the new version database and tables automatically created by ErrorControlSystem\n\n\nFirst open `SQL Server Management Studio` then connect to your Server instance.\nNext step's, Create New Database by name __UsersManagements__ or any name of your choice.\n\nOnly be carefully, in order to launch the program, enter the database name. For example: \n\n```C#\n\nExceptionHandler.Engine.Start(new Connection(\"Server\", \"Database\", \"User\", \"Pass\"));\n\n// or simpler mode:\nExceptionHandler.Engine.Start(\"Server\", \"Database\", \"User\", \"Pass\");\n\n```\n\nNow, we need to create two table by names __ErrorLog__ and __Snapshots__ to save exceptions by screen captures.\n\n__ErrorLog Table:__\n\n| Column Name      | Data Type           | Description                                                   | Example\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n|:---------------- |:------------------- |:--------------------------------------------------------------|:---------------------------------------------------------------------------------|\n| ErrorId          |  `bigint`           | The unique identity number for exceptions by that location.\t | 51\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| ServerDateTime   |  `datetime`         | Server system's date and time when the error occurred.\t\t | 2015-04-11 17:23:08.170\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| Host             |  `varchar(200)`     | The client PC name.\t\t\t\t\t\t\t\t\t\t\t | KHOSRAVIFAR-B\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| User             |  `varchar(200)`     | User Domain Name \\ User name in operation system\t\t\t\t | DBI\\khosravifar.b\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| IsHandled\t\t   |  `bit`              | Determine this error whether handled or not ?\t\t\t\t | True\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| Type             |  `varchar(200)`     | Type of specify exceptions.\t\t\t\t\t\t\t\t\t | NullReferenceException\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| AppName\t\t   |  `varchar(200)`     | The application name, who that run this module on self.\t \t | Examples.WinForms v1.0.0\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| Data             |  `xml`              | Provide additional user-defined information.\t\t\t\t\t | `\u003cExtraProperties\u003e\u003cStatus\u003eRequestCanceled\u003c/Status\u003e\u003cResponse/\u003e\u003c/ExtraProperties\u003e` |\n| CurrentCulture   |  `nvarchar(200)`    | Current keyboard language, may change over the app lifetime.  | English (United States) (en-US)\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| CLRVersion\t   |  `varchar(100)`     | Version of Common Language Runtime.\t\t\t\t\t\t\t | 4.0.30319.34014\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| Message          |  `nvarchar(MAX)`    | Message of Exceptions.\t\t\t\t\t\t\t\t\t\t | Object reference not set to an instance of an object.\t\t\t\t\t\t\t|\n| Source           |  `nvarchar(MAX)`    | Name of the application or the object that causes throw error.| mscorlib\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| StackTrace       |  `nvarchar(MAX)`    | Representation of the immediate frames on the call stack.\t | N{namespace}.C{class}.M{method(parameters)} -\u003e ...\t\t\t\t\t\t\t\t|\n| ModuleName\t   |  `varchar(200)`     | Name of the module that causes to throw exception.\t\t\t | Examples.WinForms.exe\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| MemberType\t   |  `varchar(200)`     | Type of the member, include: Method, constructor, and so on.\t | Method\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| Method           |  `nvarchar(500)`    | Name of the method that throws the exception.\t\t\t\t | Examples.WinForms.namespace.class.Void method(params)\t\t\t\t\t\t\t|\n| Processes        |  `varchar(MAX)`     | List of all running process when exception occurred.\t\t\t | vmware-hostd, Idle, ...\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| ErrorDateTime\t   |  `datetime`         | Client system's date and time when the error occurred.\t\t | 2015-04-11 17:23:07.800\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| OS               |  `varchar(1000)`    | Information of the client operation system in `JSON` formats\t | Windows 8.1 64Bit v6.3.9600.0 - 64Bit Processor Architect - 32Bit Application\t|\n| IPv4Address\t   |  `varchar(50)`      | Network Internal IP Address\t\t\t\t\t\t\t\t\t | 192.168.30.40\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| MACAddress\t   |  `varchar(50)`      | Network Physical Address (MAC)\t\t\t\t\t\t\t\t | 74D435F250A0\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| HResult          |  `int`              | Error Code - Use GetType().Name for define exception model.   | -2147467261\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| Line\t\t\t   |  `int`              | Line of exception occurrence code in file.\t\t\t\t\t | 125\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| Column\t\t   |  `int`              | Column of exception occurrence code in file.\t\t\t\t\t | 17\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| DuplicateNo\t   |  `int`              | Number of duplication for one exception's.\t\t\t\t\t | 5\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n__Snapshots Table:__\n\n| Column Name      | Data Type            |\n|:---------------- |:---------------------|\n| ErrorLogId       |   `int`              |\n| ScreenCapture    |   `image`            |\n\nFor easy way please go ahead and try [Wiki](https://github.com/Behzadkhosravifar/ErrorControlSystem/wiki) to use SQL Queries.\nThere are __SQL Scripts__ to create tables and queries.\n\n\n\n--------------------------\n### Get it on NuGet       [![Nuget count](http://img.shields.io/nuget/v/errorcontrolsystem.svg)](https://www.nuget.org/packages/errorcontrolsystem/)\n\nYou may use ErrorControlSystem as a library that you install with [Nuget](https://www.nuget.org/packages/ErrorControlSystem/) into your project or as a Visual Studio extension. \nThe way you want to use it depends on the scenario you are working on. You most likely want the [Nuget](https://www.nuget.org/packages/ErrorControlSystem/) package.\n\nTo install Error Control System from [Nuget](https://www.nuget.org/packages/ErrorControlSystem/), \nrun the following command in the [Package Manager Console](http://docs.nuget.org/consume/package-manager-console)\n\n```powershell\nPM\u003e Install-Package ErrorControlSystem\n```\n\n\n--------------------------\n### Contributing\n\nQuestions, comments, bug reports, and pull requests are all welcome.\nBug reports that include steps-to-reproduce (including code) are\npreferred. Even better, make them in the form of pull requests.\nBefore you start to work on an existing issue, check if it is not assigned\nto anyone yet, and if it is, talk to that person.\nAlso check the project [board](http://huboard.com/BehzadKhosravifar/ErrorControlSystem/board)\nand verify it is not being worked on (it will be tagged with the `Working` tag).\nIf it is not being worked on, before you start check if the item is `Ready`.\nIf the issue has the `Working` tag (working swimlane on Huboard) and has no Assignee\nthen it is not being worked on by somebody on the core team. Check the issue's\ndescription to find out who it is (if it is not there it has to be on the comments).\n\n\n--------------------------\n### Issues and task board       [![Issues open](http://img.shields.io/github/issues-raw/behzadkhosravifar/ErrorControlSystem.svg)](https://huboard.com/behzadkhosravifar/ErrorControlSystem)\n\n* The task board is at [Huboard](http://huboard.com/BehzadKhosravifar/ErrorControlSystem/).\n* You can also check the [Github backlog](https://github.com/BehzadKhosravifar/ErrorControlSystem/issues) directly.\n\n\n--------------------------\n### Contact\n\nPlease see our [contact page](https://www.nuget.org/packages/ErrorControlSystem/ContactOwners).\n\nEmail: [Behzad.Khosravifar@gmail.com](mailto:Behzad.Khosravifar@Gmail.com)\n\n[![3355825.png](http://stackoverflow.com/users/flair/3355825.png)](http://stackoverflow.com/users/3355825/behzad-khosravifar)\n\n--------------------------\n### LICENSE INFORMATION      [![OSI-Approved-License-100x137.png](http://opensource.org/trademarks/opensource/OSI-Approved-License-100x137.png)](http://opensource.org/licenses/GPL-3.0.html)\n\nThis software is open source, licensed under the GNU General Public License, Version 3.0.\nSee [GPL-3.0](http://opensource.org/licenses/GPL-3.0.html) for details.\nThis Class Library creates a way of handling structured exception handling,\ninheriting from the Exception class gives us access to many method\nwe wouldn't otherwise have access to\n                  \nCopyright (C) 2014-2015 [Behzad Khosravifar](mailto:Behzad.Khosravifar@Gmail.com)\n\nThis program published by the Free Software Foundation,\neither version 1.0.1 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbezzad%2Ferrorcontrolsystem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbezzad%2Ferrorcontrolsystem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbezzad%2Ferrorcontrolsystem/lists"}