Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add fail method #51

Merged
merged 2 commits into from Dec 30, 2015

Conversation

@AdrieanKhisbe
Copy link
Contributor

AdrieanKhisbe commented Dec 30, 2015

Implement #33 feature request

Implemented #33 feature request
exception = err;
}

Hoek.assert(exception, exception);

This comment has been minimized.

Copy link
@cjihrig

cjihrig Dec 30, 2015

Contributor

This assertion can be dropped.

Hoek.assert(exception, exception);
Hoek.assert(exception.message === 'Something wrong happened!', exception);
done();

This comment has been minimized.

Copy link
@cjihrig

cjihrig Dec 30, 2015

Contributor

Please remove this blank line

}

Hoek.assert(exception, exception);
Hoek.assert(exception.message === 'Final Failure', exception);

This comment has been minimized.

Copy link
@cjihrig

cjihrig Dec 30, 2015

Contributor

This is the only assertion you need. The other two can be removed.

Hoek.assert(exception.message !== 'FAIL AGAIN', exception);
done();
});

This comment has been minimized.

Copy link
@cjihrig

cjihrig Dec 30, 2015

Contributor

Please remove this blank line.

README.md Outdated
var Code = require('code');
var fail = Code.fail;
fail('This should not occur');

This comment has been minimized.

Copy link
@cjihrig

cjihrig Dec 30, 2015

Contributor

Can you just call Code.fail() and drop the var fail = Code.fail;

@AdrieanKhisbe

This comment has been minimized.

Copy link
Contributor Author

AdrieanKhisbe commented Dec 30, 2015

voila :)

@cjihrig cjihrig added the feature label Dec 30, 2015
@cjihrig cjihrig added this to the 2.0.2 milestone Dec 30, 2015
@cjihrig cjihrig self-assigned this Dec 30, 2015
@cjihrig

This comment has been minimized.

Copy link
Contributor

cjihrig commented Dec 30, 2015

Thanks!

cjihrig added a commit that referenced this pull request Dec 30, 2015
add fail method
@cjihrig cjihrig merged commit fb11228 into hapijs:master Dec 30, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@AdrieanKhisbe AdrieanKhisbe deleted the AdrieanKhisbeArchives:features/fail branch Dec 30, 2015
@AdrieanKhisbe

This comment has been minimized.

Copy link
Contributor Author

AdrieanKhisbe commented Dec 30, 2015

de rien :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.