Re: can't understand

Esteban Manchado Velázquez <[email protected]>
Newsgroups gmane.comp.apache.mod-ruby
Message-ID <20040315140712.GA731@rojo>
On Mon, Mar 15, 2004 at 02:35:19PM +0200, Andrew Kulinich wrote:
> I have this code:
> ---
> <%
> 
> raise 'here'
> 
> puts <<-TT
>     #{ error( here }
> TT
> 
> %>
> ---
> 
> As you can see - it has syntax error in line 6.
> But when I request this from browser I not see raised exception:
> 
> ---
> /usr/local/lib/ruby/1.8/apache/eruby-run.rb:112:in `load': 
> /tmp/tt.html.9913.0:6: syntax error (SyntaxError)
>     from /usr/local/lib/ruby/1.8/apache/eruby-run.rb:112:in `run'
>     from /usr/local/lib/ruby/1.8/apache/eruby-run.rb:78:in `handler'
>     from /usr/local/lib/ruby/1.8/auto-reload.rb:84
> ---
> 
> Why? As I understanding, ruby interpreter must stop on "raise 'here'".

   No. If there is a syntax error, ruby can't execute the script. Try
injecting that code directly into the command-line interpreter.

   Regards,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.