beautypg.com

Pl_exp_listerr_script(101) – Roper Photometric User Manual

Page 29

background image

Chapter 2. ICL

23

PVCAM

Class 101: ICL

pl_exp_listerr_script(101)

NAME

pl_exp_listerr_script

– if an error occurred during script processing, list

the exact position of that error.

SYNOPSIS

boolean

pl_exp_listerr_script( int16 hcam, char_ptr err_char,

uns32_ptr err_char_num, uns32_ptr err_line,
uns32_ptr err_ch_in_line )

DESCRIPTION

By default, this function returns zeros for all values, indicating that no logical or
syntactical error was spotted in the script. This function resets each time

pl_exp_setup_script

is called. If the last call to

pl_exp_setup_script

generates an error, this function returns the location (where processing stopped)
of that error in the script string. In some cases, the location reported may just be
past the location of the actual error.

The character that generated the error is returned in

err_char

. This will be

character number

err_char_num

in the input string (0-indexed, as with all C

strings). The script is also examined for line-feed, newlines, etc. in an attempt to
divide the script into the separate lines used by common word processors. The
line number and character in the line are returned in

err_line

and

err_ch_in_line

. Both of those values are 1-indexed, as is typical with text

editors and word processors, so that the first character in the script is character 1
of line 1.

RETURN VALUE

TRUE for success, FALSE for a failure. Failure sets pl_error_code.

SEE ALSO

pl_exp_setup_script(101)

NOTES

Separate error lists are kept for each

hcam

, so multiple cameras (and multiple

users) will not collide. This reports on the error state following the most recent
call to

pl_exp_setup_script( )

using this value of

hcam

. A new call to

pl_exp_setup_script( )

resets the error list.

Some errors indicate a problem with the entire program rather than a single line
(for example, errors 10122 or 10123). In such a case, the error will be listed as
occurring at “character 0, line 0.” This indicates that while no single line is at
fault, there was an inconsistency in the program at large.