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

model_generator crash when the config.yaml is empty. #111

Closed
vanlooverenkoen opened this issue Feb 17, 2022 · 3 comments · Fixed by #122
Closed

model_generator crash when the config.yaml is empty. #111

vanlooverenkoen opened this issue Feb 17, 2022 · 3 comments · Fixed by #122
Assignees
Labels
bug Something isn't working enhancement New feature or request P0 Highest prio

Comments

@vanlooverenkoen
Copy link
Contributor

Unhandled exception:
NoSuchMethodError: The method ‘forEach’ was called on null.
Receiver: null
Tried calling: forEach(Closure: (dynamic, dynamic) => Null)
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:38:5)
#1      new YmlGeneratorConfig (package:model_generator/config/yml_generator_config.dart:30:29)
#2      main (file:///Users/user123/.pub-cache/hosted/pub.dartlang.org/model_generator-5.8.1/bin/model_generator.dart:51:7)
#3      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:32)
#4      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
pub finished with exit code 255
@vanlooverenkoen vanlooverenkoen changed the title model_generator crash when model_generator is not configured in pubspec.yaml model_generator crash when the config.yaml is empty. Feb 17, 2022
@vanlooverenkoen
Copy link
Contributor Author

A better error warning should be shown.

@vanlooverenkoen vanlooverenkoen self-assigned this Feb 17, 2022
@vanlooverenkoen vanlooverenkoen added bug Something isn't working enhancement New feature or request labels Feb 17, 2022
@vanlooverenkoen vanlooverenkoen added the P0 Highest prio label Oct 14, 2022
@NicolaVerbeeck
Copy link
Contributor

Or nothing should happen (catch crash and continue silently)

@vanlooverenkoen
Copy link
Contributor Author

Indeed that is what should be done

@NicolaVerbeeck NicolaVerbeeck moved this from Todo to In Progress in icapps Flutter OSS Oct 17, 2022
NicolaVerbeeck added a commit that referenced this issue Oct 17, 2022

Verified

This commit was signed with the committer’s verified signature.
NicolaVerbeeck Nicola Verbeeck
Fixes #111
@NicolaVerbeeck NicolaVerbeeck moved this from In Progress to In Review in icapps Flutter OSS Oct 17, 2022
Repository owner moved this from In Review to Done in icapps Flutter OSS Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request P0 Highest prio
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants