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

Add more info into the AnalyticsException #181

Merged
merged 5 commits into from
Oct 17, 2023

Conversation

eliasyishak
Copy link
Contributor

In my testing in the flutter tool codebase, I realized that adding more info about what was causing the failure when enabling asserts would be beneficial to others working with this package and other clients of this package.


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

@@ -102,7 +123,9 @@ void checkBody(Map<String, Object?> body) {
value as String;
if (value.length > 100) {
throw AnalyticsException(
'Limit characters in event param value to 100 chars or less');
'Limit characters in event param value to 100 chars or less\n'
'Value for "$key" is too long, value="$value"',
Copy link
Member

Choose a reason for hiding this comment

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

Slight re-word for better clarity

Suggested change
'Value for "$key" is too long, value="$value"',
'For key "$key" the value "$value" is too long',

Copy link
Member

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

some nits for clarity, but otherwise LGTM

eliasyishak and others added 2 commits October 17, 2023 10:55
Co-authored-by: Christopher Fujino <[email protected]>
@eliasyishak eliasyishak merged commit 15cc9c7 into dart-lang:main Oct 17, 2023
6 checks passed
@eliasyishak eliasyishak deleted the add-more-info-to-asserts branch October 17, 2023 15:17
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.

2 participants