Hello
begin
if(nil|pattern.match(details)) then
id=$1
rec=Scans.find(id)
rec.scannable=MARKTRUE
rec.save
else
badpattern=true
end
rescue RecordNotFound
badpattern=true
end
I still get the prog stopping and printing out the exception
Pl choose alert action? 3 1000
e:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:266:in load_missing_constant': uniniti alized constant RecordNotFound (NameError) from e:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/ active_support/dependencies.rb:452:in
const_missing’
from e:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/
active_support/dependencies.rb:464:in const_missing' from MainMenu.rb:118:in
alertsMenu’
On Jan 16, 7:50 am, Junkone [email protected] wrote:
rescue RecordNotFound
badpattern=true
end
I still get the prog stopping and printing out the exception
Pl choose alert action? 3 1000
uninitialized constant RecordNotFound (NameError)
This is telling you that RecordNotFound has not been defined. Maybe
you’ve forgotten to include something?
2008/1/16, yermej [email protected]:
I still get the prog stopping and printing out the exception
Pl choose alert action? 3 1000
uninitialized constant RecordNotFound (NameError)
This is telling you that RecordNotFound has not been defined.
Maybe you’ve forgotten to include something?
I guess Junkone is refering to ActiveRecord::RecordNotFound
exception, but he doesn’t give much info.
Furthermore, if it’s a ActiveRecord related problem, it should be
asked in Rails-Talk mailing list.
– Jean-François.
On Jan 16, 10:54 am, Jean-François Trân [email protected] wrote:
I guess Junkone is refering to ActiveRecord::RecordNotFound
exception, but he doesn’t give much info.
Furthermore, if it’s a ActiveRecord related problem, it should be
asked in Rails-Talk mailing list.
– Jean-François.yes nol
now i realise i should have used ActiveRecord::RecordNotFound
thanks