try catch exception in updateQuery