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

[fix] a nicer error handling instead of app crash #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PerrchicK
Copy link

@PerrchicK PerrchicK commented Aug 30, 2020

Main Change

  • Now the app won't crash in case the string path represents an invalid URL (probably due to spaces in path).
  • The plugin will return a Flutter error instead.

Tip 💡

Try not to use force unwrap ! unless you want the app to crash. For example, in let dic = call.arguments as! [String : Any] it's still forgiven because this dictionary must exist, unless there's an integration error. Although I personally prefer to use safe unwrap (if let / guard let) in these cases as well.

Now the app won't crash in case the string path represents an invalid URL (probably due to spaces in path), instead it will return a Flutter error from the plugin.
@PerrchicK
Copy link
Author

This PR fixes this issue:
#30

ibedek pushed a commit to ibedek/flutter_audio_recorder that referenced this pull request Mar 15, 2021
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

Successfully merging this pull request may close these issues.

1 participant