The Mighty “Success Exception”

For all those Java programmers who feel lonely in the land of .NET – here’s a class just for you!

using System;

namespace Biz.Your.Company.Goes.Here.Util
{
	public sealed class SuccessException : Exception
	{
		public SuccessException() : base() 
		{
			System.Environment.Exit(1);
		}

		public SuccessException(string msg) : base(msg)
		{
			System.Environment.Exit(1);
		}

		public SuccessException(string msg, Exception exception) : base(msg, exception)
		{
			System.Environment.Exit(1);
		}
	}
}