SEHException Clase
Definición
Representa errores de Control de excepciones estructurado (SEH).Represents structured exception handling (SEH) errors.
public ref class SEHException : Exception
public ref class SEHException : System::Runtime::InteropServices::ExternalException
public class SEHException : Exception
public class SEHException : System.Runtime.InteropServices.ExternalException
[System.Serializable]
public class SEHException : System.Runtime.InteropServices.ExternalException
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public class SEHException : System.Runtime.InteropServices.ExternalException
type SEHException = class
inherit Exception
type SEHException = class
inherit ExternalException
[<System.Serializable>]
type SEHException = class
inherit ExternalException
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type SEHException = class
inherit ExternalException
Public Class SEHException
Inherits Exception
Public Class SEHException
Inherits ExternalException
- Herencia
- Herencia
- Atributos
Comentarios
La SEHException clase controla los errores de SEH que se producen desde el código no administrado, pero que no se han asignado a otra excepción .NET Framework.The SEHException class handles SEH errors that are thrown from unmanaged code, but that have not been mapped to another .NET Framework exception. La SEHException clase también se corresponde con HRESULT
E_FAIL
(0x80004005).The SEHException class also corresponds to the HRESULT
E_FAIL
(0x80004005).
El .NET Framework suele tener en cuenta las excepciones SEH no administradas que se asignan automáticamente a los equivalentes administrados.The .NET Framework often encounters unmanaged SEH exceptions that are automatically mapped to managed equivalents. Hay dos excepciones SEH no administradas comunes:There are two common unmanaged SEH exceptions:
STATUS_NO_MEMORY
las excepciones se asignan automáticamente a la OutOfMemoryException clase.STATUS_NO_MEMORY
exceptions are automatically mapped to the OutOfMemoryException class.STATUS_ACCESS_VIOLATION
las excepciones se asignan automáticamente de la manera siguiente:STATUS_ACCESS_VIOLATION
exceptions are automatically mapped as follows:Si
legacyNullReferencePolicy
se aplica, todas las infracciones de acceso se asignan a la NullReferenceException clase.IflegacyNullReferencePolicy
is applied, all access violations are mapped to the NullReferenceException class.Si la dirección en la que se intentó la lectura/escritura no está en el código compilado JIT, la excepción se asigna a la AccessViolationException clase.If the address at which the read/write was attempted is not in JIT-compiled code, the exception is mapped to the AccessViolationException class.
Si la dirección en la que se intentó la lectura/escritura está en código compilado JIT, pero no en el área de partición nula de SO, la excepción se asigna a la AccessViolationException clase.If the address at which the read/write was attempted is in JIT-compiled code, but it is not in the OS Null partition area, the exception is mapped to the AccessViolationException class.
Si no hay ningún
legacyNullReferencePolicy
, y la dirección en la que se intentó la lectura/escritura está en código compilado JIT y en el área de partición nula de SO, la excepción se asigna a la NullReferenceException clase.If there is nolegacyNullReferencePolicy
, and the address at which the read/write was attempted is in JIT-compiled code and in the OS Null partition area, the exception is mapped to the NullReferenceException class.
Cualquier excepción SEH que no se asigne automáticamente a una excepción específica se asigna a la SEHException clase de forma predeterminada.Any SEH exception that is not automatically mapped to a specific exception is mapped to the SEHException class by default.
Tenga en cuenta que la SEHException clase no hace que se llame a los destructores de excepción de C++ no administrados.Note that the SEHException class does not cause unmanaged C++ exception destructors to be called. Para asegurarse de que se llama a los destructores de excepción de C++ no administrados, utilice la siguiente sintaxis en el catch
bloque.To ensure that unmanaged C++ exception destructors are called, use the following syntax in the catch
block.
Catch
' Handle catch here.
End Try
catch
{
// Handle catch here.
}
catch(…)
{
// Handle catch here.
}
Constructores
SEHException() |
Inicializa una nueva instancia de la clase SEHException.Initializes a new instance of the SEHException class. |
SEHException(SerializationInfo, StreamingContext) |
Inicializa una nueva instancia de la clase SEHException a partir de los datos de serialización.Initializes a new instance of the SEHException class from serialization data. |
SEHException(String) |
Inicializa una nueva instancia de la clase SEHException con el mensaje especificado.Initializes a new instance of the SEHException class with a specified message. |
SEHException(String, Exception) |
Inicializa una nueva instancia de la clase SEHException con el mensaje de error especificado y una referencia a la excepción interna que representa la causa de esta excepción.Initializes a new instance of the SEHException class with a specified error message and a reference to the inner exception that is the cause of this exception. |
Propiedades
Data |
Obtiene una colección de pares clave/valor que proporciona información definida por el usuario adicional sobre la excepción.Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Heredado de Exception) |
ErrorCode |
Obtiene el elemento |
HelpLink |
Obtiene o establece un vínculo al archivo de ayuda asociado a esta excepción.Gets or sets a link to the help file associated with this exception. (Heredado de Exception) |
HResult |
Obtiene o establece HRESULT, un valor numérico codificado que se asigna a una excepción específica.Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Heredado de Exception) |
InnerException |
Obtiene la instancia Exception que produjo la excepción actual.Gets the Exception instance that caused the current exception. (Heredado de Exception) |
Message |
Obtiene un mensaje que describe la excepción actual.Gets a message that describes the current exception. (Heredado de Exception) |
Source |
Devuelve o establece el nombre de la aplicación o del objeto que generó el error.Gets or sets the name of the application or the object that causes the error. (Heredado de Exception) |
StackTrace |
Obtiene una representación de cadena de los marcos inmediatos en la pila de llamadas.Gets a string representation of the immediate frames on the call stack. (Heredado de Exception) |
TargetSite |
Obtiene el método que produjo la excepción actual.Gets the method that throws the current exception. (Heredado de Exception) |
Métodos
CanResume() |
Indica si la excepción puede recuperarse o no, y si el código puede continuar ejecutándose a partir del punto en el que se inició la excepción.Indicates whether the exception can be recovered from, and whether the code can continue from the point at which the exception was thrown. |
Equals(Object) |
Determina si el objeto especificado es igual que el objeto actual.Determines whether the specified object is equal to the current object. (Heredado de Object) |
GetBaseException() |
Cuando se invalida en una clase derivada, devuelve la clase Exception que representa la causa principal de una o más excepciones posteriores.When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Heredado de Exception) |
GetHashCode() |
Sirve como la función hash predeterminada.Serves as the default hash function. (Heredado de Object) |
GetObjectData(SerializationInfo, StreamingContext) |
Cuando se invalida en una clase derivada, establece SerializationInfo con información sobre la excepción.When overridden in a derived class, sets the SerializationInfo with information about the exception. (Heredado de Exception) |
GetType() |
Obtiene el tipo de tiempo de ejecución de la instancia actual.Gets the runtime type of the current instance. (Heredado de Exception) |
MemberwiseClone() |
Crea una copia superficial del Object actual.Creates a shallow copy of the current Object. (Heredado de Object) |
ToString() |
Crea y devuelve una representación de cadena de la excepción actual.Creates and returns a string representation of the current exception. (Heredado de Exception) |
ToString() |
Devuelve una cadena que contiene el HRESULT del error.Returns a string that contains the HRESULT of the error. (Heredado de ExternalException) |
Eventos
SerializeObjectState |
Ocurre cuando una excepción se serializa para crear un objeto de estado de excepción que contenga datos serializados sobre la excepción.Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. (Heredado de Exception) |