Issue #1606362 by nod_, Angry Dan, seutje: Use throw when an ajax error occurs and extend JavaScript's Error object.