Fix Javascript exception messages.