Returns the NType object representing .NET type associated with this NException object (type of .NET exception thrown).
NType object representing .NET type associated with this NException object (type of .NET exception thrown).
public java.lang.String getExceptionTypeName()
Returns the name of the exception type associated with this NException object (type of .NET exception thrown).
Name is provided as full class name with namespace.
name of the exception type associated with this NException object.
public java.lang.String getHelpLink()
Gets a link to the help file associated with this .NET exception.
The return value, which represents a help file, is a URN or URL.
link to the help file associated with this .NET exception.
public int getHResult()
Gets .NET HRESULT, a coded numerical value that is assigned to this exception.
HRESULT is a 32-bit value, divided into three different fields: a severity code,
a facility code, and an error code. The severity code indicates whether the return
value represents information, warning, or error. The facility code identifies the
area of the system responsible for the error. The error code is a unique number that
is assigned to represent the exception. Each exception is mapped to a distinct HRESULT.
When managed code throws an exception, the runtime passes the HRESULT to the COM client.
When unmanaged code returns an error, the HRESULT is converted to an exception, which is
then thrown by the runtime. For information about HRESULT values and their corresponding
.NET Framework exceptions, see How to: Map HRESULTs and Exceptions. See Common HRESULT
Values in the Windows documentation for a list of the values you are most likely to encounter.
.NET HRESULT, a coded numerical value that is assigned to this exception.
Gets the Exception instance that caused the current exception.
When an exception X is thrown as a direct result of a previous exception Y, the InnerException property of X should contain a reference to Y.
Use the InnerException property to obtain the set of exceptions that led to the current exception.
You can create a new exception that catches an earlier exception. The code that handles the second exception can make use of the additional information from the earlier exception to handle the error more appropriately.
Suppose that there is a function that reads a file and formats the data from that file. In this example, as the code tries to read the file, an IOException is thrown. The function catches the IOException and throws a FileNotFoundException. The IOException could be saved in the InnerException property of the FileNotFoundException, enabling the code that catches the FileNotFoundException to examine the cause of the initial error.
The InnerException property, which holds a reference to the inner exception, is set upon initialization of the exception object.
NException instance that caused the current exception.