Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[pigeon] Fix too little information when having an exception#545

Merged
gaaclarke merged 8 commits intoflutter:mainfrom
fzyzcjy:main
Jan 12, 2022
Merged

[pigeon] Fix too little information when having an exception#545
gaaclarke merged 8 commits intoflutter:mainfrom
fzyzcjy:main

Conversation

@fzyzcjy
Copy link
Contributor

@fzyzcjy fzyzcjy commented Jan 6, 2022

Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.

List which issues are fixed by this PR. You must list at least one issue.
Fix flutter/flutter#96027
Please see #543

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@gaaclarke
Copy link
Member

@fzyzcjy For making this publishable you'll have to update the version of pigeon in pubspec.yaml and update the CHANGELOG.md.

For the test, i think this is close to what you want: https://github.com/gaaclarke/packages/blob/6529013ca4619ac0f1d6690a1cf0b98cabc75823/packages/pigeon/platform_tests/android_unit_tests/android/app/src/test/java/com/example/android_unit_tests/PigeonTest.java#L57:L57

Those tests generate the java code then run unit tests on them. You'll just want to set a handler that throws and exception and look into the details section to make sure your info exists.

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Jan 12, 2022

you'll have to update the version of pigeon in pubspec.yaml and update the CHANGELOG.md.

Sure. Just want to finish test first before this

For the test, i think this is close to what you want

Thanks

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Jan 12, 2022

@gaaclarke tests passed

Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

LGTM thanks

@gaaclarke gaaclarke merged commit 519fea2 into flutter:main Jan 12, 2022
@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Jan 13, 2022

@gaaclarke You are welcome!

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.

[Pigeon] Too little information when there is an exception

2 participants