We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6604c3 commit eb66421Copy full SHA for eb66421
lib/vows/suite.js
@@ -129,12 +129,14 @@ this.Suite.prototype = new(function () {
129
}
130
131
// Run the topic, passing the previous context topics
132
- // If topic `throw`s an exception, pass it down as a value
133
try {
134
topic = topic.apply(ctx.env, ctx.topics);
135
+ // If an unexpected error occurs in the topic, set the return
136
+ // value to 'undefined' and call back with the error
137
catch (ex) {
138
ctx.env.callback(ex);
139
+ topic = undefined;
140
141
142
if (typeof(topic) === 'undefined') { ctx._callback = true }
0 commit comments