-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(region-info): throw exception when no fact found #5166
feat(region-info): throw exception when no fact found #5166
Conversation
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
* @param region the name of the region (e.g: `us-east-1`) | ||
* @param name the name of the fact being looked up (see the `FactName` class for details) | ||
*/ | ||
public static getFact(region: string, name: string): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Names starting with get
are not ideal (they won't translate very cleanly in other supported languages like Java - where it'll collide with a possible future static property getter).
How about naming it require
? (This is just a suggestion - if you have a better idea that doesn't start with get
, that should be fine).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like your suggestion, and that escaped my mind. Updated to requireFact
.
Pull request has been modified.
7eee215
to
03c867a
Compare
* New method that throws an exception when the Fact value, given a name and region, are not found. closes aws#3194
03c867a
to
ad8afa2
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool beans!
Thank you for contributing! Your pull request is now being automatically merged. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
* New method that throws an exception when the Fact value, given a name and region, are not found. closes aws#3194
closes #3194
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license