|
iceoryx2
C++ Language Bindings
|
Defines the test reaction of dynamic error handling. More...
#include <testing_error_handler.hpp>
Public Member Functions | |
| TestingErrorHandler () noexcept=default | |
| ~TestingErrorHandler () noexcept override=default | |
| TestingErrorHandler (const TestingErrorHandler &) noexcept=delete | |
| TestingErrorHandler (TestingErrorHandler &&) noexcept=delete | |
| auto | operator= (const TestingErrorHandler &) noexcept -> TestingErrorHandler &=delete |
| auto | operator= (TestingErrorHandler &&) noexcept -> TestingErrorHandler=delete |
| auto | on_panic () -> void override |
| Defines the reaction on panic. | |
| auto | on_report_error (legacy::er::ErrorDescriptor desc) -> void override |
| Defines the reaction on error. | |
| auto | on_report_violation (legacy::er::ErrorDescriptor desc) -> void override |
| Defines the reaction on violation. | |
| auto | has_panicked () const noexcept -> bool |
| Indicates whether there was a panic call previously. | |
| auto | reset () noexcept -> void |
| Reset panic state and clears all errors that occurred previously. | |
| auto | has_error () const noexcept -> bool |
| Indicates whether any error occurred previously. | |
| auto | has_error (legacy::er::ErrorCode code, legacy::er::ModuleId module=legacy::er::ModuleId()) const noexcept -> bool |
| Indicates whether a specific error occurred previously. | |
| auto | has_violation (legacy::er::ErrorCode code) const noexcept -> bool |
| Indicates whether a assumption violation occurred previously. | |
| auto | fatal_failure_test_context (const bb::StaticFunction< void()> &test_function) -> bool |
| runs test_function in a test context that can detect fatal failures; runs in the same thread | |
Public Member Functions inherited from iox2::legacy::er::ErrorHandlerInterface | |
| virtual | ~ErrorHandlerInterface ()=default |
Static Public Member Functions | |
| static auto | init () noexcept -> void |
| Initialized the error handler. This should be called in the main function of the test binary. | |
Defines the test reaction of dynamic error handling.
Definition at line 41 of file testing_error_handler.hpp.
|
defaultnoexcept |
|
overridedefaultnoexcept |
|
deletenoexcept |
|
deletenoexcept |
|
inline |
runs test_function in a test context that can detect fatal failures; runs in the same thread
Definition at line 139 of file testing_error_handler.hpp.
References iox2::legacy::concurrent::Atomic< T >::exchange().
|
inlinenoexcept |
Indicates whether any error occurred previously.
Definition at line 102 of file testing_error_handler.hpp.
|
inlinenoexcept |
Indicates whether a specific error occurred previously.
Definition at line 108 of file testing_error_handler.hpp.
References iox2::legacy::er::ModuleId::ANY.
|
inlinenoexcept |
Indicates whether there was a panic call previously.
Definition at line 88 of file testing_error_handler.hpp.
References iox2::legacy::concurrent::Atomic< T >::load().
|
inlinenoexcept |
Indicates whether a assumption violation occurred previously.
Definition at line 125 of file testing_error_handler.hpp.
|
inlinestaticnoexcept |
Initialized the error handler. This should be called in the main function of the test binary.
Definition at line 201 of file testing_error_handler.hpp.
References iox2::legacy::PolymorphicHandler< Interface, Default, Hooks >::set().
|
inlineoverridevirtual |
Defines the reaction on panic.
Implements iox2::legacy::er::ErrorHandlerInterface.
Definition at line 67 of file testing_error_handler.hpp.
|
inlineoverridevirtual |
Defines the reaction on error.
| desc | error descriptor |
Implements iox2::legacy::er::ErrorHandlerInterface.
Definition at line 74 of file testing_error_handler.hpp.
|
inlineoverridevirtual |
Defines the reaction on violation.
| desc | error descriptor |
Implements iox2::legacy::er::ErrorHandlerInterface.
Definition at line 81 of file testing_error_handler.hpp.
|
deletenoexcept |
|
deletenoexcept |
|
inlinenoexcept |
Reset panic state and clears all errors that occurred previously.
Definition at line 93 of file testing_error_handler.hpp.
References iox2::legacy::concurrent::Atomic< T >::store().