catching object factory exception