FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

ERB Error annotations question

 
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users
View previous topic :: View next topic  
Author Message
Chris Kutler
Posted via mailing list.





PostPosted: Thu Aug 21, 2008 4:27 pm    Post subject: ERB Error annotations question Reply with 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.

Or is this statement not true?

Chris
Back to top
Tor Norbye
Posted via mailing list.





PostPosted: Fri Aug 22, 2008 5:45 pm    Post subject: ERB Error annotations question Reply with 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
Chris Kutler
Posted via mailing list.





PostPosted: Fri Aug 22, 2008 5:50 pm    Post subject: ERB Error annotations question Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB