I not 100% sure I don't think this class meets the class es6 specifications because you are overriding the stack attribute which makes it hard to extend and modify the stack property via class inheritance offered in ES6. I had recently made a library https://github.com/bluejamesbond/TraceError.js. If you think, this offers a potential benefits, I would happy to provide a pull request into your library.
I not 100% sure I don't think this class meets the
classes6 specifications because you are overriding thestackattribute which makes it hard to extend and modify thestackproperty via class inheritance offered in ES6. I had recently made a library https://github.com/bluejamesbond/TraceError.js. If you think, this offers a potential benefits, I would happy to provide a pull request into your library.