On Dec 18, 6:14 pm, hendra kusuma <[email protected]> wrote:
> Sorry for not making myself clear
> What I really intend to do is catch if there is error
> you know, like begin rescue end
> can I add a rescue there?
> I cannot seem to find any doc with source example
begin
DB.transaction{dataset.insert(:field => data)}
rescue Sequel::Error
# Error occured
else
# No error occured
end
I guess the reason it isn't documented explicitly is that it operates
like most ruby libraries, in that it raises an exception if there is
an error.
Jeremy
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en.