Skip to content

Instantly share code, notes, and snippets.

@aseemk
Created May 11, 2011 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aseemk/966185 to your computer and use it in GitHub Desktop.
Save aseemk/966185 to your computer and use it in GitHub Desktop.
Eco error messages contain meaningless line numbers
<h2>Error reporting</h2>
<p>
Does the error message for this page report the correct line number?
</p>
<% para = (phrase) -> %>
<p><%= phrase %></p>
<% end %>
<%- para 'Hello world.' %>
<%- para 'What's up doc?' %>
<%- para 'Not much, how about you?' %>
<p>
Good luck finding the error!
</p>
_print _safe '<h2>Error reporting</h2>\n\n<p>\n Does the error message for this page report the correct line number?\n</p>\n\n'
para = (phrase) ->
_capture ->
_print _safe '\n <p>'
_print phrase
_print _safe '</p>\n'
_print _safe '\n\n'
_print _safe para 'Hello world.'
_print _safe '\n'
_print _safe para 'What's up doc?'
_print _safe '\n'
_print _safe para 'Not much, how about you?'
_print _safe '\n\n<p>\n Good luck finding the error!\n</p>\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment