Skip to content

Conversation

@szakarias
Copy link
Contributor

No description provided.

Copy link
Member

@mit-mit mit-mit left a comment

Choose a reason for hiding this comment

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

Thanks, looks great. But looks like you missed the throw part?

response.error("UNAVAILABLE", "Battery level not available.", null);
}
} else {
throw new IllegalArgumentException("Unknown method " + call.method);
Copy link
Member

Choose a reason for hiding this comment

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

I think you missed the throw part?

response.error("UNAVAILABLE", "Battery level not available.", null);
}
} else {
throw new IllegalArgumentException("Unknown method " + call.method);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should handle unknown methods by response.error too. That's what we'll have to do on the iOS side, because of the difficulty of manual memory management in face of exceptions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As discussed, removed the exception for now.

@szakarias szakarias merged commit 972da54 into flutter:master Mar 22, 2017
@szakarias szakarias deleted the refactorPlatformServices branch March 27, 2017 10:37
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants