Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix macro string interpolation #225

Merged
merged 1 commit into from
Sep 7, 2019
Merged

Fix macro string interpolation #225

merged 1 commit into from
Sep 7, 2019

Conversation

hanneskaeufler
Copy link
Contributor

I ran into this when upgrading to lucky 0.17. Not yet having made the necessary changes switching forms to operations, I got the unwieldly

Error: undefined macro variable 'type'

This is due to mistakenly using normal string interpolation where we instead want the macro argument to be interpolated into the error message. This then shows the proper error message

Error: BaseForm has been renamed to SaveOperation. Please inherit from Post::SaveOperation.

I ran into this when upgrading to lucky 0.17. Not yet having made the necessary changes switching forms to operations, I got the unwieldly
```
Error: undefined macro variable 'type'
```

This is due to mistakenly using normal string interpolation where we instead want the macro argument to be interpolated into the error message. This then shows the proper error message

```
Error: BaseForm has been renamed to SaveOperation. Please inherit from Post::SaveOperation.
```
Copy link
Member

@jwoertink jwoertink left a comment

Choose a reason for hiding this comment

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

Thanks for catching that!

@jwoertink jwoertink merged commit 66864a9 into luckyframework:master Sep 7, 2019
@hanneskaeufler hanneskaeufler deleted the patch-1 branch September 8, 2019 09:25
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants