# Sequel error handeling

**URL:** <https://www.ruby-forum.com/t/sequel-error-handeling/169197>\
**Category:** Ruby\
**Created:** [May 31, 2009, 2:44pm UTC](https://www.ruby-forum.com/t/sequel-error-handeling/169197 "2009-05-31T14:44:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![heldopslippers](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b9bd4f/32.png) [@heldopslippers](https://www.ruby-forum.com/u/heldopslippers)\
**Post date:** [May 31, 2009, 2:44pm UTC](https://www.ruby-forum.com/t/sequel-error-handeling/169197/1 "2009-05-31T14:44:49Z")

</div>

hee people.

I have a problem with error handeling in sequel.  
here is my code:  
[http://pastie.org/495630](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 😃
