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(shorebird_cli): handle exceptions during validation more gracefully #359

Merged
merged 3 commits into from
Apr 24, 2023

Conversation

bryanoltman
Copy link
Contributor

Description

The ShorebirdFlutterValidator could previously throw unhandled exceptions if it failed to successfully execute flutter --version. This change catches those exceptions and treats them as validation errors.

This change also renames flutter_validation_mixin.dart to shorebird_validation_mixin.dart to reflect the class contained in the file.

Fixes #357.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@bryanoltman bryanoltman requested a review from eseidel April 24, 2023 20:10
@@ -15,7 +15,7 @@ class _MockPlatform extends Mock implements Platform {}
class _MockShorebirdProcess extends Mock implements ShorebirdProcess {}

void main() {
group('ShorebirdFlutterValidator', () {
group(ShorebirdFlutterValidator, () {
Copy link
Contributor

Choose a reason for hiding this comment

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

You can pass a class name to group? til.

@bryanoltman bryanoltman merged commit 624dafc into main Apr 24, 2023
@bryanoltman bryanoltman deleted the bo/flutter-validation-error-handling branch April 24, 2023 20:18
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.

fix: bad output from validation failure?
2 participants