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
process
ProcessThe 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
message
stringA string that describes the error. The content of
message
is 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
message
stringThe error message that explains the reason for the exception.
innerException
ExceptionThe exception that is the cause of the current exception. If the
innerException
parameter 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
message
stringThe exception message.
exitCode
intThe 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
info
SerializationInfoThe System.Runtime.Serialization.SerializationInfo that holds the serialized object data about the exception being thrown.
context
StreamingContextThe System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination.
Exceptions
- ArgumentNullException
The
info
parameter is a null reference (Nothing in Visual Basic).