exceptions#
Special exceptions raised by Core in certain situations.
Exceptions#
Exception type that indicates a validation error in a Domain. |
|
Exception type raised when two or more domains should match, but don’t. |
|
Exception type that indicates that a given domain is not supported. |
|
Exception type that indicates that a key is not in the given domain. |
|
Exception type for when a column is not in the given domain’s schema. |
|
Exception raised when a given metric is not supported. |
|
Exception raised when two or more metrics should match, but don’t. |
|
Raised when a given combination of values is not supported. |
|
Error raised when a given measure is not supported. |
|
Error raised when two or more measures should match, but don’t. |
|
Error raised when the given noise mechanism is not supported. |
|
Error raised when trying to use an unsupported Sympy expression. |
- exception OutOfDomainError(domain, value, msg)#
Bases:
ExceptionException type that indicates a validation error in a Domain.
- Parameters:
domain (tmlt.core.domains.base.Domain)
value (Any)
msg (str)
- value#
The value that is not in the domain.
- exception DomainMismatchError(domains, msg)#
Bases:
ValueErrorException type raised when two or more domains should match, but don’t.
- Parameters:
domains (Iterable[tmlt.core.domains.base.Domain])
msg (str)
- exception UnsupportedDomainError(domain, msg)#
Bases:
TypeErrorException type that indicates that a given domain is not supported.
- Parameters:
domain (tmlt.core.domains.base.Domain)
msg (str)
- exception DomainKeyError(domain, key, msg)#
Bases:
ExceptionException type that indicates that a key is not in the given domain.
- Parameters:
domain (tmlt.core.domains.base.Domain)
key (Any)
msg (str)
- key#
The key that was not in the domain, or a collection of keys that are not in the domain.
- exception DomainColumnError(domain, column, msg)#
Bases:
ExceptionException type for when a column is not in the given domain’s schema.
- Parameters:
domain (tmlt.core.domains.base.Domain)
msg (str)
- exception UnsupportedMetricError(metric, msg)#
Bases:
ValueErrorException raised when a given metric is not supported.
- Parameters:
metric (tmlt.core.metrics.Metric)
msg (str)
- metric#
The metric that is not supported.
- exception MetricMismatchError(metrics, msg)#
Bases:
ValueErrorException raised when two or more metrics should match, but don’t.
- Parameters:
metrics (Iterable[tmlt.core.metrics.Metric])
msg (str)
- metrics#
The metrics that should match, but do not.
- exception UnsupportedCombinationError(combination, msg)#
Bases:
ValueErrorRaised when a given combination of values is not supported.
If this exception is raised, any of the values used may be individually valid, but they are not valid in this particular combination.
For example, when a metric does not support a given domain, this is the error that is raised.
- Parameters:
combination (Iterable[Any])
msg (str)
- combination#
The combination of values that are not supported.
- exception UnsupportedMeasureError(measure, msg)#
Bases:
ValueErrorError raised when a given measure is not supported.
- Parameters:
measure (tmlt.core.measures.Measure)
msg (str)
- exception MeasureMismatchError(measures, msg)#
Bases:
ValueErrorError raised when two or more measures should match, but don’t.
- Parameters:
measures (Iterable[tmlt.core.measures.Measure])
msg (str)
- exception UnsupportedNoiseMechanismError(noise_mechanism, msg)#
Bases:
ValueErrorError raised when the given noise mechanism is not supported.
- Parameters:
noise_mechanism (tmlt.core.measurements.aggregations.NoiseMechanism)
msg (str)
- noise_mechanism#
The
NoiseMechanismthat is not supported.
- exception UnsupportedSympyExprError(expr, msg)#
Bases:
ValueErrorError raised when trying to use an unsupported Sympy expression.
This error is raised when an
ExactNumbercannot be created from a given SymPy expression. This might be raised because the expression corresponds to an imaginary number, because the expression has a free variable, or because the expression is a kind of Sympy expression that ExactNumber does not support (such as sums).- Parameters:
expr (sympy.Expr)
msg (str)
- expr#
the invalid Sympy expression.