Hi,
I’ve a Rails application who starts a Ruby script .
The script is made via Web -> database.
Than you can select a script to start via a database list.
Problem:
In case of errors , I like to start a rescue showing the users the
problems.
render(:text => “
” + CGI::escapeHTML(`
begin
/home/luc/radrails/cpe/public/startq_test.rb #{syntf.path}
rescue
NoMethodError,SyntaxError,NameError,StandardError,SystemExit,ScriptError
=> snfault
fltlog = File.open("/test/result/script.log", “w”)
fltlog.puts “#{snfault}”
fltlog.close
end`) + "</pre>")Rescue don’t work in this case, how can I check syntax errors?