Catch possible exception.