Skip to content
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

error handler #1

Closed
HugeBrain16 opened this issue Apr 14, 2021 · 1 comment
Closed

error handler #1

HugeBrain16 opened this issue Apr 14, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@HugeBrain16
Copy link
Owner

example

...

cmd = cmd('/say')

def error_say(error):
   if isinstance(error, AttributeError):
      ...

def say(raw_args, args):
   print(say.text)

ProcessCmd(cmd, say, error_say,
   attr={
      'name': noattrib4u
   }
)
@HugeBrain16 HugeBrain16 added the enhancement New feature or request label Apr 14, 2021
@HugeBrain16 HugeBrain16 self-assigned this Apr 14, 2021
@HugeBrain16
Copy link
Owner Author

HugeBrain16 commented Apr 14, 2021

error handler has been added, see commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant