Last modified: December 2013

URL: https://cxc.cfa.harvard.edu/chips/ahelp/set_error_verbosity.html
AHELP for CIAO 4.11 ChIPS v1

set_error_verbosity

Context: errors

Synopsis

Controls the amount of error information returned by ChIPS.

Syntax

set_error_verbosity(level)

Description

The function arguments.

Argument Description
level The level of error handling (an integer in the range 0 to 3 inclusive; values greater than 3 are taken to be 3).

The set_error_verbosity command controls the amount of detail printed when errors are detected in ChIPS. This command is part of the advanced ChIPS module; refer to "ahelp chips" for information. To load the module:

from pychips.advanced import *

Examples

Example 1

chips> set_error_verbosity(0)
0
chips> set_preference("color", "red")
35

Set the error verbosity level to 0, so that errors are returned as numeric error code values rather than as strings.

Example 2

chips> set_error_verbosity(3)

Set the error verbosity level to print detailed information when errors occur.


Error Levels

Error Verbosity Levels

Feature Level 0 Level 1 Level 2 Level 3
Returns numeric error value Yes No No No
Prints out warning messages No No Yes Yes
Prints out error messages No Yes Yes Yes
Removes messages with duplicate text N/A Yes Yes No
Shows object hierarchy where error occurred N/A No No Yes

A more complete explanation of the levels:

For instance, a failed label command might produce:

chips ERROR: The label size value (-5) must be between 1 
and 100 {object: win1->frm1->lbl1}
chips ERROR: The label size value (-5) must be between 1 
and 100 {object: win1->frm1->lbl2}

Bugs

See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.

See Also

errors
clear_errors, get_error_count, get_error_types, get_error_verbosity, get_errors