Skip to content

Commit

Permalink
tried getting rid of the unhandled reject error, for ProjetDeRecherch…
Browse files Browse the repository at this point in the history
  • Loading branch information
cesine committed Feb 10, 2014
1 parent 7e5e101 commit 59b3c4b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions OPrime-HTML5/montage-client/ui/experiment.reel/experiment.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,12 @@ exports.Experiment = ContextualizableComponent.specialize( /** @lends Experiment
Confirm.show(options, function() {
promiseForConfirm.resolve();
}, function() {
console.log("The x prevented the cancel?");
// promiseForConfirm.reject(new Error("The x prevented the cancel?"));

// promiseForConfirm.reject("The user clicked cancel.");
// [Q] Unhandled rejection reasons (should be empty): ["(no stack) The user clicked cancel."]
// https://github.com/kriskowal/q/issues/292
// https://github.com/kriskowal/q/issues/238 TODO seems to be nothing i can do about it...
console.log("The user clicked cancel.");
});
} else {
Promise.nextTick(function() {
Expand Down Expand Up @@ -289,7 +293,7 @@ exports.Experiment = ContextualizableComponent.specialize( /** @lends Experiment
if (this._currentTestBlock.promptUserBeforeContinuing) {
this.confirm(this._currentTestBlock.promptUserBeforeContinuing.text).then(function() {
self.nextStimulus();
}, function(reason) {
}).fail(function(reason) {
console.log("TODO add a button for resume?");
});
} else {
Expand Down

0 comments on commit 59b3c4b

Please sign in to comment.