You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on some libraries where it would be helpful to give better error messages for when things are missing. Here is an example
macrorender(page)
{% page.resolve? %}
{{page}}
{%else%}
{%raise"You must create a page called #{page} that inherits from BasePage in src/views"%}
{%end%}
end
render IndexPage
If there were a resolve? that returned whether the type was available or not, this would solve the problem. What do you think about something like that?
The text was updated successfully, but these errors were encountered:
paulcsmith
changed the title
Suggestion: Add resolve? for macro Path
Suggestion: Adding resolve? for macro Path
May 3, 2017
RX14
added a commit
to RX14/crystal
that referenced
this issue
May 12, 2017
I'm working on some libraries where it would be helpful to give better error messages for when things are missing. Here is an example
If there were a
resolve?
that returned whether the type was available or not, this would solve the problem. What do you think about something like that?The text was updated successfully, but these errors were encountered: