cloudhead/vows — pull request #263 by adamstallard (2013-01-23 06:49:54+00:00)
Title: Handle errors correctly based on suite.options.error and the number of parameters expected by the vow

Currently, if an error occurs in a topic and a subsequent vow expects 2 or more parameters, the first (error) parameter will be set to null and the second will contain the error.

Currently a reference error in a topic will be thrown instead of tallied as an error in the reporter.

This a fix that implements the following, which seems to coincide with the documentation:

When suite.options.error is set to false or a vow expects two or more parameters, get the error as the first argument and don't report it; When suite.options.error is set to true and a vow expects zero or one parameters, report the error and don't run the vow.