Forum: Ruby sequel error handeling

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Held O. (Guest)
on 2009-05-31 16:44
hee people.

I have a problem with error handeling in sequel.
here is my code:
http://pastie.org/495630


As you can see i have a method called create.
in my migration i set the domain to be unique. So i get an error when i
try to set a domain name twice ...

but how can i get that error ? .. i tried (as you can see):
if item.save
 return true .... etc ..

but that doesn't work :( ( obviously) ...
i googled, read the cheatsheet, readme etc etc.
irc doesn't respond so .. hopefully you guys know!!...

thanxs :D
This topic is locked and can not be replied to.