| View previous topic :: View next topic |
| Author |
Message |
Chris Kutler Posted via mailing list.
|
Posted: Thu Aug 21, 2008 4:27 pm Post subject: ERB Error annotations question |
|
|
I read somewhere in regards to error annotations in ERB files (I didn't make a note of the source when I added the statement to my notes)
"The IDE models what an ERB file will do in a Rails server and maps these errors back to the source."
Can anyone give me an example of this type of error that gets flagged in the source editor.
Or is this statement not true?
Chris |
|
| Back to top |
|
 |
Tor Norbye Posted via mailing list.
|
Posted: Fri Aug 22, 2008 5:45 pm Post subject: ERB Error annotations question |
|
|
On Aug 21, 2008, at 9:27 AM, Chris Kutler wrote:
| Quote: | I read somewhere in regards to error annotations in ERB files (I didn't make a note of the source when I added the statement to my notes)
"The IDE models what an ERB file will do in a Rails server and maps these errors back to the source."
Can anyone give me an example of this type of error that gets flagged in the source editor.
|
NetBeans simulates what the ERb tool will do in a Rails server; it will generate Ruby from it, then parse that Ruby, and any errors in that generated Ruby will then be shown - in the ERb file, at the ERb location corresponding to the place in the temporarily generated Ruby file where the parsing error occurred.
I think in 99% of cases (possibly 100% of cases), the errors will be a plain Ruby code error in your own scriptlet, e.g.
<div>
<% x = "unterminated string %>
</div>
-- Tor |
|
| Back to top |
|
 |
Chris Kutler Posted via mailing list.
|
Posted: Fri Aug 22, 2008 5:50 pm Post subject: ERB Error annotations question |
|
|
This is great. Thanks.
Tor Norbye wrote: | Quote: | On Aug 21, 2008, at 9:27 AM, Chris Kutler wrote:
| Quote: | I read somewhere in regards to error annotations in ERB files (I didn't make a note of the source when I added the statement to my notes)
"The IDE models what an ERB file will do in a Rails server and maps these errors back to the source."
Can anyone give me an example of this type of error that gets flagged in the source editor.
|
NetBeans simulates what the ERb tool will do in a Rails server; it will generate Ruby from it, then parse that Ruby, and any errors in that generated Ruby will then be shown - in the ERb file, at the ERb location corresponding to the place in the temporarily generated Ruby file where the parsing error occurred.
I think in 99% of cases (possibly 100% of cases), the errors will be a plain Ruby code error in your own scriptlet, e.g.
<div>
<% x = "unterminated string %>
</div>
-- Tor
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|