Microsoft.Win32.Win32RegistryApi.GenerateException C# (CSharp) Méthode

GenerateException() private méthode

convert a win32 error code into an appropriate exception.
private GenerateException ( int errorCode ) : void
errorCode int
Résultat void
		private void GenerateException (int errorCode)
		{
			switch (errorCode) {
				case Win32ResultCode.FileNotFound:
				case Win32ResultCode.InvalidParameter:
					throw new ArgumentException ();
				case Win32ResultCode.AccessDenied:
					throw new SecurityException ();
				case Win32ResultCode.NetworkPathNotFound:
					throw new IOException ("The network path was not found.");
				default:
					// unidentified system exception
					throw new SystemException ();
			}
		}