AdaCore / RecordFlux

Formal specification and generation of verifiable binary parsers, message generators and protocol state machines
Apache License 2.0
107 stars 7 forks source link

Change RecordFluxError.propagate to only raise exceptions on errors #1255

Closed jklmnn closed 2 years ago

jklmnn commented 2 years ago

Context and Problem Statement

Currently when a RecordFluxError is propagated it will raise an exception if it contains any element. This is also true if it only contains a warning or info message. However this should not cause an abort in the program.

Proposed solution

propagate does not raise an exception on info and warning messages. Additionally check will only return True if the error object contains error messages. This is required as check is used to determine whether an operation should abort due to previous errors.