This commit introduces a new test, Test_DispatchEventWithError, to verify error handling when dispatching events. It ensures that the dispatcher properly returns an error when an event handler triggers one.
Introduce error-producing handlers to test command, query, and event dispatch processes. Ensure proper error propagation when handlers encounter failures. Validate that expected errors are correctly returned in all scenarios.
Introduced a Dispatcher to manage command, query, and event handlers in a thread-safe manner utilizing read-write mutexes. This includes handler registration and dispatching logic, error handling for unregistered handlers, and support for concurrent operations. Added comprehensive tests for handler registration, dispatching, and error scenarios.