add deprecation warning for ctx.error

Didn't notice the change until now. A warning would be useful
This commit is contained in:
Eivind Fjeldstad 2013-12-19 11:48:32 +01:00
parent 2f4163f6e6
commit ddde5f96ef

View file

@ -75,6 +75,7 @@ module.exports = {
*/ */
error: function(msg, status){ error: function(msg, status){
console.warn('ctx.error is deprecated, use ctx.throw');
this.throw(msg, status); this.throw(msg, status);
}, },