Module exceptions

exception sismic.exceptions.SismicError

Bases: Exception

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception sismic.exceptions.StatechartError

Bases: SismicError

Base error for anything that is related to a statechart.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception sismic.exceptions.CodeEvaluationError

Bases: SismicError

Base error for anything related to the evaluation of the code contained in a statechart.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception sismic.exceptions.ExecutionError

Bases: SismicError

Base error for anything related to the execution of a statechart.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception sismic.exceptions.ConflictingTransitionsError

Bases: ExecutionError

When multiple conflicting (parallel) transitions can be processed at the same time.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception sismic.exceptions.NonDeterminismError

Bases: ExecutionError

In case of non-determinism.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception sismic.exceptions.PropertyStatechartError(property_statechart)

Bases: SismicError

Raised when a property statechart reaches a final state.

Parameters:

property_statechart – the property statechart that reaches a final state

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception sismic.exceptions.ContractError(configuration=None, step=None, obj=None, assertion=None, context=None)

Bases: SismicError

Base exception for situations in which a contract is not satisfied. All the parameters are optional, and are exposed to ease debug.

Parameters:
  • configuration – list of active states

  • step – a MicroStep or MacroStep instance.

  • obj – the object that is concerned by the assertion

  • assertion – the assertion that failed

  • context – the context in which the condition failed

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception sismic.exceptions.PreconditionError(configuration=None, step=None, obj=None, assertion=None, context=None)

Bases: ContractError

A precondition is not satisfied.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception sismic.exceptions.PostconditionError(configuration=None, step=None, obj=None, assertion=None, context=None)

Bases: ContractError

A postcondition is not satisfied.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception sismic.exceptions.InvariantError(configuration=None, step=None, obj=None, assertion=None, context=None)

Bases: ContractError

An invariant is not satisfied.

add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.