catch sqlite exception