classifier#

Classify exceptions raised by settings calls.

The order of checks is:

  1. the product’s clean stop of an interruptible command (is_interrupt()) is benign;

  2. a fatal error reported by the product is catastrophic;

  3. typed product exceptions (inactive, read-only, disallowed value);

  4. message heuristics for errors the server reports as plain text;

  5. an otherwise unknown error is catastrophic only if the server no longer answers a health check.

Error text alone never makes an error catastrophic, so a message that merely mentions “fatal” cannot trigger a failover.

Classes:

ErrorClassifier(adapter)

Map an exception, and optionally its session, to a Classification.

Functions:

make_classification(category, message[, details])

Build a classification with the default severity of category.

class ansys.fluent.core.resilient.engine.classifier.ErrorClassifier(adapter)#

Bases: object

Map an exception, and optionally its session, to a Classification.

Methods:

__init__(adapter)

classify(err[, session, interruptible])

Classify err.

__init__(adapter)#
classify(err, session=None, *, interruptible=False)#

Classify err.

Parameters:
errBaseException

The exception to classify.

sessionoptional

The session the error came from. When given, the product’s fatal state and the server health are consulted.

interruptiblebool, optional

Whether the failing call was an interruptible (solve) command.

Returns:
Classification

The classification of err.

ansys.fluent.core.resilient.engine.classifier.make_classification(category, message, details=None)#

Build a classification with the default severity of category.