S
S
sasha2014-07-14 06:53:31
JavaScript
sasha, 2014-07-14 06:53:31

Why is there no stack in Promise RSVP in error?

I use RSVP for promises. In this library, you can specify one error handler and everything seems to be fine, BUT! there is no stack in the error object where this error came from.
On the site of the module , it is recommended to use the following construction:

rsvp.on('error', function(reason) {
            console.assert(false,reason);
        });

which I did. but the point is that there is no stack in reason. More precisely, the stack of the place where the console.assert failed was issued
, that is, that's what's on the stack
AssertionError: [Error]
    at Console.assert (console.js:102:23)
    at ...
    at Object.exports.default.trigger ...
    at Promise._onerror ...
    at publishRejection ...
    at flush ...
    at process._tickCallback (node.js:419:13)
    at Function.Module.runMain (module.js:499:11)
    at startup (node.js:119:16)
    at node.js:906:3

The error is called like thisthrow new Error();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sasha, 2014-07-14
@madmages

in the end, I'm just a brake. stack is inreason.stack

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question