Re: RecordNotFound
- From: Franz Bettag <fbettag@xxxxxxxxxxxxxx>
- Date: Thu, 16 Mar 2006 13:37:28 +0100
aaah! Thanks a lot!
Michael Gorsuch schrieb:
Try using Ruby's exception handling:
begin
@new_ipv4 = Ipv4addr.find(IPAddr.new(params[:ipv4addr][:id]).to_i)
rescue
# Code to add data to database
end
A little more info:
http://www.rubycentral.com/book/tut_exceptions.html
On 3/16/06, Franz Bettag <fbettag@xxxxxxxxxxxxxx> wrote:
Hi guys,
uhm how to fetch out a RecordNotFound?
i have this here
@new_ipv4 = Ipv4addr.find(IPAddr.new(params[:ipv4addr][:id]).to_i)
but at this line it gives an error RecordNotFound. But this is okay! But
now i want the application to do something special like adding the not
found IPaddr to the database.. But how? since it stops at this line =)
Thanks in advance!
--
Mit freundlichen Grüßen
Franz Bettag
____________________________
QS Housing
Franz Bettag
Ludwigstr. 45-47
90402 Nürnberg
http://www.qs-housing.net
Tel: +49 1805 737376 664
Fax: +49 1805 737376 665
--
Mit freundlichen Grüßen
Franz Bettag
____________________________
QS Housing
Franz Bettag
Ludwigstr. 45-47
90402 Nürnberg
http://www.qs-housing.net
Tel: +49 1805 737376 664
Fax: +49 1805 737376 665
.
- References:
- RecordNotFound
- From: Franz Bettag
- Re: RecordNotFound
- From: Michael Gorsuch
- RecordNotFound
- Prev by Date: Re: RecordNotFound
- Next by Date: Variant types
- Previous by thread: Re: RecordNotFound
- Next by thread: Re: RecordNotFound
- Index(es):
Relevant Pages
|