Renamed wrong types for exceptions in javascript