# PDL_JSException

## Description

From a Plug-in handler function, throws an exception and accompanying exception message to the calling JavaScript.

Handler functions serve as interfaces between a JavaScript app and a Plug-in app. See "JavaScript and Plug-in Interface" for more information on how this works.

## Syntax

>     PDL_Err PDL_JSException(PDL_JSParameters *params, const char *reply);

Argument | Description
--- | ---
params | This is passed to the handler function and should simply be passed on here. This type's internals are hidden from the user.
reply | Exception text, e.g., "Invalid Parameters".

## Returns

>     PDL_NOERROR on success.

See also:

- PDL_RegisterJSHandler
- PDL_JSRegistrationComplete
- PDL_GetNumJSParams
- PDL_GetJSParamDouble
- PDL_GetJSParamString
- PDL_GetJSParamInt
- PDL_JSReply
- PDL_CallJS