I would have thought that
q.delay(x, t) would be equivalent to
q.delay(t).thenResolve(x) however I found a difference when
x is a rejected promise. Specifically,
var q = require('q');
q.delay(100).then(function() { return q.reject(new Error('foo')); }).fail(function(err) {});
will exit without error, while:
var q = require('q');
q.delay(q.reject(new Error('foo')), 100).fail(function(err) {});
will exit with:
Unhandled rejected promise: Error: foo
at Object.<anonymous> (/test1.js:2:18)
at node.js:901:3
From previous event:
at Object.<anonymous> (/test1.js:2:3)
at node.js:901:3
Is this a bug in Q or in my understanding? Thanks!
--
You received this message because you are subscribed to the Google Groups "Q Continuum (JavaScript)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
q-continuum...@googlegroups.com.
For more options, visit
https://groups.google.com/groups/opt_out.