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

How do I catch a specific exception? #238

Open
YuMurata opened this issue Oct 21, 2024 · 0 comments
Open

How do I catch a specific exception? #238

YuMurata opened this issue Oct 21, 2024 · 0 comments

Comments

@YuMurata
Copy link

Hi.
I want to catch exceptions and handle them differently depending on the type of exception.

For example:

try {
...
} catch(err) {
  if(err instanceof UserOfflineError) {
    console.log('offline')
    return
  }
  throw err
} 

However, I can't do this because the Error class of TikTok-Live-Connector doesn't seem to be exported.

Please tell me what to do.

Thanks.

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

No branches or pull requests

1 participant