+
Skip to content

feat(ListenerHandler): add error handling #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

papaia
Copy link
Contributor

@papaia papaia commented May 8, 2020

This PR adds handling for errors that happen inside listeners.

Changes

Move error event constant from CommandHandlerEvents to AkairoHandlerEvents;

Add ListenerHandler#emitError method (similar to the CommandHandler counterpart);

Add private ListenerHandler#modifyExec method;

Add ListenerHandler#error event;

Use modifyExec in register;

Caveats

After deregistering a listener, the modified exec stays on it. Fixed by attaching _raw as the original exec on the modified version with d4032b6 🎉

@papaia papaia changed the title feat(ListenerHandler): add error event feat(ListenerHandler): add error handling Jun 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载