Skip to content

Conversation

yuwen-yan
Copy link
Collaborator

@yuwen-yan yuwen-yan commented Dec 31, 2019

Follow-up PR for #202

Copy link
Contributor

@luigi-rosso luigi-rosso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is cleaner, thank you. I'm curious though, how was the provider returning null prior to these changes?

@yuwen-yan
Copy link
Collaborator Author

yuwen-yan commented Jan 7, 2020

@luigi-rosso it's about error handling, AFAIK, there are two ways to fail:

  • Throw exception in AssetProvider.load() , in this case, we should raise this exception to client application and show nothing.
  • Return invalid ByteData (including null) by AssetProvider.load(), in this case, right now we will raise an exception when exec FlutterActor.loadFromByteData(data).

I was thinking that we should suppress the exception for invalid ByteData, but after a second thought, I think it's also ok to raise it, WDYT? So I'm going to hold this PR for now..

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.

2 participants