core
core copied to clipboard
Inheritance from Error
JavaScript Error constructor does not use the this parameter but returns a new object. Although when targeting EcmaScript 6, class syntax works for inheriting it, compiling to ES5 the prototype set for the base class will be erased by this and must be restored for correct behavior.