Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Fix handling of exceptions thrown by frame handlers#201

Merged
WyriHaximus merged 1 commit intojakubkulhan:0.6.xfrom
appkit-framework:frame-handler-exceptions
Jan 14, 2026
Merged

Fix handling of exceptions thrown by frame handlers#201
WyriHaximus merged 1 commit intojakubkulhan:0.6.xfrom
appkit-framework:frame-handler-exceptions

Conversation

@appkit-framework
Copy link
Contributor

Currently, in the connection->on('data') callback, if the function stored in $frameHandler['filter'] throws an exception, it is not catched at all, causing the entire process to crash.

I propose to catch these exceptions and reject the corresponding promise with it. This way, the exception is passed to the user calling original method like channel->publish() allowing for proper error handling.

@WyriHaximus WyriHaximus force-pushed the frame-handler-exceptions branch 3 times, most recently from 4ca0c90 to f13b6b6 Compare December 16, 2025 07:47
@WyriHaximus WyriHaximus force-pushed the frame-handler-exceptions branch from f13b6b6 to ecb53c1 Compare December 27, 2025 22:31
@WyriHaximus WyriHaximus force-pushed the frame-handler-exceptions branch 8 times, most recently from d46e3fe to f0d5e98 Compare January 14, 2026 11:39
@WyriHaximus WyriHaximus force-pushed the frame-handler-exceptions branch from f0d5e98 to a3c0c52 Compare January 14, 2026 11:53
@WyriHaximus WyriHaximus merged commit cd5de7c into jakubkulhan:0.6.x Jan 14, 2026
228 checks passed
@WyriHaximus WyriHaximus added this to the v0.6.0 milestone Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants