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

PlayerException Docs Missing Error Code Details #1103

Closed
dickermoshe opened this issue Oct 25, 2023 · 7 comments
Closed

PlayerException Docs Missing Error Code Details #1103

dickermoshe opened this issue Oct 25, 2023 · 7 comments
Assignees
Labels
1 backlog documentation Improvements or additions to documentation

Comments

@dickermoshe
Copy link

dickermoshe commented Oct 25, 2023

To which pages does your suggestion apply?

Quote the sentences(s) from the documentation to be improved (if any)

On iOS and macOS, maps to NSError.code. On Android, maps to ExoPlaybackException.type. On Web, maps to MediaError.code.

Describe your suggestion

Link to where this error code info is, I have searched for a while and cant find the apple docs for these error codes

@dickermoshe dickermoshe added 1 backlog documentation Improvements or additions to documentation labels Oct 25, 2023
@ryanheise
Copy link
Owner

To be honest, Apple's error code documentation is all over the place because there are different error domains with their own set of codes, and there is no document that tells you exactly which subset of errors is possible for a given API call. But if you receive an error, you can look it up by searching for that specific error. One thing that could help in the future is if the PlayerException included the error domain since that could help you to locate which specific list of error codes to look at (but again, searching directly for the error you encountered might be faster).

@ryanheise
Copy link
Owner

FYI, here is one domain that shows up a lot:

https://developer.apple.com/documentation/foundation/nsurlerrordomain?language=objc

@dickermoshe
Copy link
Author

Maybe apple just has a bad layout, but I can't find a list of actual error codes/numbers.

@ryanheise
Copy link
Owner

That's correct, each error is defined as a constant, and while you can find various lists of these error symbols, you have to click on each one to view the page for that symbol which tells you the error code. If you want a list of all error codes, perhaps what you can do is find the Apple header files which may include the symbols and the numeric codes.

@ryanheise
Copy link
Owner

Here's the header file containing the error codes for the domain I mentioned above:

https://github.com/xybp888/iOS-SDKs/blob/master/iPhoneOS13.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h

@dickermoshe
Copy link
Author

Thanks. Thats perfect!

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with just_audio.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1 backlog documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants