rtfeldman / seamless-immutable

Immutable data structures for JavaScript which are backwards-compatible with normal JS Arrays and Objects.
BSD 3-Clause "New" or "Revised" License
5.36k stars 194 forks source link

Changed ImmutableError to be an instance of Error #195

Closed mbjurman closed 7 years ago

mbjurman commented 7 years ago

Changes ImmutableError to be a custom error type instead of a generator/factory function.

This should fix https://github.com/rtfeldman/seamless-immutable/issues/143

Based on suggestions here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Custom_Error_Types

rtfeldman commented 7 years ago

Lovely, thank you @mbjurman! 😍