It is not useless, the exception is thrown by setAttribute