Marko v3: Improved error message

This commit is contained in:
Patrick Steele-Idem 2016-02-09 15:19:39 -07:00
parent 7ec3579a2d
commit b8fd053bc3

View File

@ -40,7 +40,7 @@ class FunctionDeclaration extends Node {
codegen.write(param);
} else {
if (param.type !== 'Identifier') {
throw new Error('Illegal param: ' + param);
throw new Error('Illegal param ' + JSON.stringify(param) + ' for FunctionDeclaration: ' + JSON.stringify(this));
}
codegen.generateCode(param);
}