exception handler
According to the conditions of the query