The exceptions submodule

Warning

The exceptions listed in this section are implementation details of CondConfigParser. Do not use them in your programs from this namespace if you rely on API stability, as they are likely to change in incompatible ways without prior notice.

Exceptions defined by CondConfigParser.

exception condconfigparser.exceptions.error(message=None)[source]

Bases: Exception

Base class for exceptions in CondConfigParser.

complete_message()[source]
ExceptionShortDescription = 'CondConfigParser generic exception'
exception condconfigparser.exceptions.InvalidUsage(message=None)[source]

Bases: error

Exception raised when CondConfigParser is used in an incorrect way.

ExceptionShortDescription = 'invalid use of CondConfigParser'
exception condconfigparser.exceptions.ParseError(pos, msg)[source]

Bases: error

Exception raised when CondConfigParser finds a syntax error in the stream to parse.

ExceptionShortDescription = 'unable to parse the configuration'
exception condconfigparser.exceptions.UndefinedVariable(name=None)[source]

Bases: error

Exception raised when trying to evaluate an undefined variable.

Because of the checks on assignments and predicates performed by condconfigparser.condconfig.RawConditionalConfig’s constructor, this exception should not be seen by user code. Please report if you find this is not the case.

ExceptionShortDescription = 'undefined variable'
exception condconfigparser.exceptions.UndefinedVariablesInAssignmentOrPredicate(production, startToken, undef)[source]

Bases: error

Exception raised when an assignment or predicate uses a variable before it is defined.

This exception should not be seen by user code. Please report if you find this is not the case.

undefVariables

frozenset of condconfigparser.lexer.VariableToken instances

exception condconfigparser.exceptions.UndefinedVariablesInAssignment(startToken, undef)[source]

Bases: UndefinedVariablesInAssignmentOrPredicate

Exception raised when an assignment uses a variable before it is defined.

exception condconfigparser.exceptions.UndefinedVariablesInPredicate(startToken, undef)[source]

Bases: UndefinedVariablesInAssignmentOrPredicate

Exception raised when a predicate uses a variable before it is defined.

exception condconfigparser.exceptions.InTestTypeError(inToken, origExc)[source]

Bases: error

Exception raised when an inTest can’t be eval()’ed because of a type mismatch.

ExceptionShortDescription = 'mismatching types in membership test'