Skip to content

exceptions: update docs, fix NoPluginError and remove url arg from NoStreamsError #5088

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

Merged
merged 2 commits into from
Jan 12, 2023

Conversation

bastimeyer
Copy link
Member

  • Make NoPluginError inherit from StreamlinkError instead of PluginError
  • Update and fix docstrings of all Streamlink exception classes
  • Update list of exceptions in API docs
  • Fix exports

NoPluginError is only raised here and caught in the main CLI module where URLs get resolved. It shouldn't inherit from PluginError, because it's something entirely different.

- Make `NoPluginError` inherit from `StreamlinkError`
  instead of `PluginError`
- Update and fix docstrings of all Streamlink exception classes
- Update list of exceptions in API docs
- Fix exports
@bastimeyer
Copy link
Member Author

@bastimeyer
Copy link
Member Author

Btw, no idea why NoStreamsError has the url argument. It's not used at all, and also unneeded considering that the Plugin instance gets initialized with the url argument.

except NoStreamsError:
return {}

And the empty streams error message is coming from the main CLI module:

if not streams:
console.exit(f"No playable streams found on this URL: {args.url}")

@bastimeyer bastimeyer changed the title exceptions: update docs and fix NoPluginError exceptions: update docs, fix NoPluginError and remove url arg from NoStreamsError Jan 12, 2023
@gravyboat gravyboat merged commit 6556276 into streamlink:master Jan 12, 2023
@bastimeyer bastimeyer deleted the exceptions branch January 13, 2023 01:40
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