Click here to Skip to main content
11,437,002 members (66,283 online)
Click here to Skip to main content
Add your own
alternative version

Automatic Error Handling

, 17 Mar 2008 CPOL
Handle web and WinForms exceptions automatically.
namespace WinAppTest
{
	partial class Form1
	{
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose( bool disposing )
		{
			if( disposing && ( components != null ) )
			{
				components.Dispose();
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code

		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this._testButton = new System.Windows.Forms.Button();
			this.SuspendLayout();
			// 
			// _testButton
			// 
			this._testButton.Location = new System.Drawing.Point( 13, 13 );
			this._testButton.Name = "_testButton";
			this._testButton.Size = new System.Drawing.Size( 238, 23 );
			this._testButton.TabIndex = 0;
			this._testButton.Text = "Throw Exception";
			this._testButton.UseVisualStyleBackColor = true;
			this._testButton.Click += new System.EventHandler( this._testButton_Click );
			// 
			// Form1
			// 
			this.ClientSize = new System.Drawing.Size( 263, 51 );
			this.Controls.Add( this._testButton );
			this.Name = "Form1";
			this.Text = "Exception Handling Test";
			this.ResumeLayout( false );

		}

		#endregion

		private System.Windows.Forms.Button _testButton;
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Andy Searls
Software Developer (Senior) Belami
United States United States
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150428.2 | Last Updated 17 Mar 2008
Article Copyright 2008 by Andy Searls
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid