Last modified: December 2013

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

get_error_verbosity

Context: errors

Synopsis

Returns the ChIPS error report "verbosity" setting presently in effect.

Syntax

get_error_verbosity()

Description

The get_error_verbosity command returns an indicator specifying the level 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 *

Example

chips> from pychips.advanced import *
chips> get_error_verbosity()
2
chips> set_preference("line.color", "x")
chips ERROR: The color 'x' is unknown or not supported
chips> set_error_verbosity(0)
0
chips> set_preference ("line.color", "x")
37
chips> set_error_verbosity(1)
chips> set_preference ("line.color", "x")
chips ERROR: The color 'x' is unknown or not supported

The advanced command module is loaded so that we have access to the get_error_verbosity and set_error_verbosity commands. We then use these commands to vary the error verbosity level and see how it influences the behavior of ChIPS.


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_errors, set_error_verbosity