On Mar 16, 2006, at 6:33 AM, Michael Gorsuch wrote:

> Try using Ruby's exception handling:
>
> begin
>   @new_ipv4 = Ipv4addr.find(IPAddr.new(params[:ipv4addr][:id]).to_i)
> rescue

The above line would be better as:

rescue ActiveRecord::RecordNotFound

That way it doesn't hide errors we weren't expecting.

>   # Code to add data to database
> end

James Edward Gray II