bruth / jsonpatch-js

A JavaScript implementation of the JSON Media Type for partial modifications: http://tools.ietf.org/html/rfc6902
http://bruth.github.io/jsonpatch-js
BSD 2-Clause "Simplified" License
181 stars 24 forks source link

InvalidPatchError does not have a call stack #28

Open felixfbecker opened 7 years ago

felixfbecker commented 7 years ago

The error.stack property is missing. Looks like CoffeeScript's "inheritance" just sets the prototype and the constructor does not contain a super() call, so the native constructor of Error is never called, which means no stack trace is captured. https://github.com/bruth/jsonpatch-js/blob/master/jsonpatch.js#L4