Class ExitCodeException
Indicates that a System.Diagnostics.Process exited with an unexpected System.Diagnostics.Process.ExitCode.
[Serializable]
public sealed class ExitCodeException : IOException
- Inheritance
-
objectExceptionSystemExceptionIOExceptionExitCodeException
- Extension Methods
Constructors
ExitCodeException()
Initializes a new instance of the System.IO.IOException class with its message string set to the empty string (""), its HRESULT set to COR_E_IO, and its inner exception set to a null reference.
public ExitCodeException()
ExitCodeException(Process)
Creates a new exit code exception.
public ExitCodeException(Process process)
Parameters
processProcessThe process that has exited.
ExitCodeException(string)
Initializes a new instance of the System.IO.IOException class with its message string set to message, its HRESULT set to COR_E_IO, and its inner exception set to null.
public ExitCodeException(string message)
Parameters
messagestringA string that describes the error. The content of
messageis intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
ExitCodeException(string, Exception)
Initializes a new instance of the System.IO.IOException class with a specified error message and a reference to the inner exception that is the cause of this exception.
public ExitCodeException(string message, Exception innerException)
Parameters
messagestringThe error message that explains the reason for the exception.
innerExceptionExceptionThe exception that is the cause of the current exception. If the
innerExceptionparameter is not null, the current exception is raised in a catch block that handles the inner exception.
ExitCodeException(string, int)
Creates a new exit code exception.
public ExitCodeException(string message, int exitCode)
Parameters
messagestringThe exception message.
exitCodeintThe System.Diagnostics.Process.ExitCode.
Properties
ExitCode
The System.Diagnostics.Process.ExitCode.
public int ExitCode { get; }
Property Value
- int
Methods
GetObjectData(SerializationInfo, StreamingContext)
When overridden in a derived class, sets the System.Runtime.Serialization.SerializationInfo with information about the exception.
[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
infoSerializationInfoThe System.Runtime.Serialization.SerializationInfo that holds the serialized object data about the exception being thrown.
contextStreamingContextThe System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination.
Exceptions
- ArgumentNullException
The
infoparameter is a null reference (Nothing in Visual Basic).