Fixed cuda gpu not found exception handling.