Sequel error handeling


#1

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 :frowning: ( obviously) …
i googled, read the cheatsheet, readme etc etc.
irc doesn’t respond so … hopefully you guys know!!..

thanxs :smiley: