LabWindows/CVI

CDotNetGetExceptionInfo

int CDotNetGetExceptionInfo (CDotNetHandle exceptionHandle, CDotNetHandle *innerException, char **message, char **source, char **stackTrace, char **targetSite, char **helpLink);

Purpose

Gets information from a .NET exception object.

Parameters

Input
Name Type Description
exceptionHandle CDotNetHandle The handle of a .NET exception object.
Output
Name Type Description
innerException CDotNetHandle The handle of the inner .NET exception object. Pass the address of a CDotNetHandle variable for this parameter. If there is no inner exception, the output value will be NULL.

You can pass NULL for this parameter.
message char * The message from the specified .NET exception object. Pass the address of a char * variable for this parameter. You must use CDotNetFreeMemory to free the output string. If there is no message, the output value will be NULL.

You can pass NULL for this parameter.
source char * The source of the specified .NET exception object. Pass the address of a char * variable for this parameter. You must use CDotNetFreeMemory to free the output string. If there is no source information, the output value will be NULL.

You can pass NULL for this parameter.
stackTrace char * The stack trace from the specified .NET exception object. Pass the address of a char * variable for this parameter. You must use CDotNetFreeMemory to free the output string. If there is no stack trace information, the output value will be NULL.

You can pass NULL for this parameter.
targetSite char * The target site from the specified .NET exception object. Pass the address of a char * variable for this parameter. You must use CDotNetFreeMemory to free the output string. If there is no target site information, the output value will be NULL.

You can pass NULL for this parameter.
helpLink char * The help link from the specified .NET exception object. Pass the address of a char * variable for this parameter. You must use CDotNetFreeMemory to free the output string. If there is no help link information, the output value will be NULL.

You can pass NULL for this parameter.

Return Value

Name Type Description
status int A value indicating whether an error occurred. Negative error codes indicate function failure.

Error codes are defined in cvi\include\cvidotnet.h.

You can use CDotNetGetErrorDescription to get the description of an error code.

Additional Information

Library: .NET Library

Include file: cvidotnet.h

LabWindows/CVI compatibility: LabWindows/CVI 8.0 and later

Example

Refer to dotnet\GenericList\genericlist.cws for an example of using the CDotNetGetExceptionInfo function.