Constructor ExternalException (String, Exception)
Publicado: octubre de 2016
Inicializa una nueva instancia de la clase ExternalException con el mensaje de error especificado y una referencia a la excepción interna que representa la causa de esta excepción.
Espacio de nombres: System.Runtime.InteropServices
Ensamblado: mscorlib (en mscorlib.dll)
Sintaxis
public ExternalException(
string message,
Exception inner
)
public:
ExternalException(
String^ message,
Exception^ inner
)
new :
message:string *
inner:Exception -> ExternalException
Public Sub New (
message As String,
inner As Exception
)
Parámetros
message
Type: System.StringMensaje de error que explica el motivo de la excepción.
inner
Type: System.ExceptionExcepción que es la causa de la excepción actual. Si el parámetro inner no es null, la excepción actual se produce en un bloque catch que controla la excepción interna.
Comentarios
An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the P:System.Exception.InnerException property. The P:System.Exception.InnerException property returns the same value that is passed into the constructor, or null if the P:System.Exception.InnerException property does not supply the inner exception value to the constructor.
The following table shows the initial property values for an instance of T:System.Runtime.InteropServices.ExternalException.
Property |
Value |
---|---|
The inner exception reference. |
|
The error message string. |
Información de versión
.NET Framework
Disponible desde 1.1
Silverlight
Disponible desde 2.0
Windows Phone Silverlight
Disponible desde 7.0
Ver también
Exception
ExternalException Sobrecarga
Clase ExternalException
Espacio de nombres System.Runtime.InteropServices
Controlar y generar excepciones
Volver al principio