diff options
author | Araq <rumpf_a@web.de> | 2015-02-08 12:10:13 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-02-08 13:38:04 +0100 |
commit | 736a04c66b679c210551ba2921b43155a57db527 (patch) | |
tree | 7f41368ae6d496fb1619f692ce568dcb58fcb5a0 /compiler | |
parent | f7f87a7709e40953be74ddd8924a8a77be7a2fa7 (diff) | |
download | Nim-736a04c66b679c210551ba2921b43155a57db527.tar.gz |
better error message
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/vm.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/vm.nim b/compiler/vm.nim index b682b4e25..090498f10 100644 --- a/compiler/vm.nim +++ b/compiler/vm.nim @@ -1438,7 +1438,9 @@ proc evalMacroCall*(module: PSym, n, nOrig: PNode, sym: PSym): PNode = # immediate macros can bypass any type and arity checking so we check the # arity here too: if sym.typ.len > n.safeLen and sym.typ.len > 1: - globalError(n.info, "got $#, but expected $# argument(s)" % [$ <n.safeLen, $ <sym.typ.len]) + globalError(n.info, "in call '$#' got $#, but expected $# argument(s)" % [ + n.renderTree, + $ <n.safeLen, $ <sym.typ.len]) setupGlobalCtx(module) var c = globalCtx |