catching exception after search