Chandra X-Ray Observatory
Skip to the navigation links
Last modified: December 2013

Jump to: Description · Example · Bugs · See Also

AHELP for CIAO 4.9 ChIPS v1


Context: errors


Retrieves the types of ChIPS errors collected.




The get_error_types command retrieves the type errors/warnings which have occured since the last legal ChIPS command. This command is part of the advanced ChIPS module; refer to "ahelp chips" for information. To load the module:

from pychips.advanced import *

The value returned can take one of four values: 0, 1, 2 or 3:

Argument Value Description
0 There are no Errors or Warnings
1 There are only Errors
2 There are only Warnings
3 There are both Errors and Warnings

The value returned is the type of errors, if any exist. Once the user issues a legal command (other than the get_error_ and set_error_ commands), the error count is reset to zero, and so the response of this command will be zero. The error statistics collected refer to ChIPS internal error only. For example, if the user mispells an attribute, this will count as a ChIPS error. If the user mispells a ChIPS command, Python will return an error saying the command is not defined, and this will not be counted in the error count, and therefore a get_error_types command will return zero.


chips> print(get_error_types())
chips> add_label(0.5, 0.5, 'FOO', 'font=foo')
chips WARNING: The requested font (foo) has not been loaded, using
default font (helvetica)
chips> e = get_error_types()
chips WARNING: The requested font (foo) has not been loaded, using
default font (helvetica)
chips> print(e)
chips> set_preference("curve.err.right", "tre")
chips ERROR: The curve.err.right value (tre) must be one of
chips> e = get_error_types()
chips> print(e)

get_error_types() is issued on a clean startup of ChIPS and the expected value of zero is returned. Next an add_label command is issued with a non-existant font. This generates warnings as shown by the subsequent get_error_types command. Next, an invalid set_preference command, with an incorrect attribute value, is issued to Chips. This results in an error. get_error_types responds with a one.


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

See Also

clear_errors, get_error_count, get_error_verbosity, get_errors, set_error_verbosity

Last modified: December 2013
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: Smithsonian Institution, Copyright © 1998-2017. All rights reserved.