System.IO.Ports.WinSerialStream.ReportIOError C# (CSharp) Méthode

ReportIOError() private méthode

private ReportIOError ( string optional_arg ) : void
optional_arg string
Résultat void
		void ReportIOError(string optional_arg)
		{
			int error = Marshal.GetLastWin32Error ();
			string message;
			switch (error) {
				case 2:
				case 3:
					message = "The port `" + optional_arg + "' does not exist.";
					break;
				case 87:
					message = "Parameter is incorrect.";
					break;
				default:
					// As fallback, we show the win32 error
					message = new Win32Exception ().Message;
					break;
			}

			throw new IOException (message);
		}