Natural Exception Structure

#### Search Results

Search

# Natural Exception Structure

The interface functions that execute Natural code (such as `nni_callnat`) return a structure named `natural_exception` that contains further information about a Natural error that might have occurred. The structure is defined in the header file natni.h. This file is contained in the directory <install-dir>\natural\samples\sysexnni.

The elements of the structure contain the following information.

Format | Element Name | Content
--- | --- | ---
int | natMessageNumber | Natural message number.
char | natMessageText[NNI_LEN_TEXT+1] | Natural message text with all replacements.
char | natLibrary[NNI_LEN_LIBRARY+1] | Natural library name.
char | natMember[NNI_LEN_MEMBER+1] | Natural member name.
char | natName[NNI_LEN_NAME+1]; | Natural function, subroutine or class name.
char | natMethod[NNI_LEN_NAME+1]; | Natural method or property name.
int | int natLine; | Natural code line where the error occurred.