29-May-03 (Created: 29-May-03) | More in 'dotnet: An FTP implementation'

5. FtpClientException

using System;

namespace Network
{
	/// 
	/// General exception class
	/// 
	public sealed class FtpClientException : System.Exception
	{
		int m_iErrorCode = 0;

		/// 
		/// An instance of FtpClientException
		/// 
		public FtpClientException() : base() { }
		/// 
		/// An instance of FtpClientException
		/// 
		/// Error code of this exception
		/// Explains what happend
		public FtpClientException(int code, string message)  { m_iErrorCode = code; throw this; }
		/// 
		/// Error code. This property is read-only.
		/// 
		public int ErrorCode
		{
			get
			{
				return m_iErrorCode;
			}
		}
	}
}