This submission is based on a request from @antirez.
Redis reports line numbers for Lua scripting errors, which is a great debugging aid. However, this does not happen when the error has to do with an invalid call to a Redis command.
To reproduce:
1999[~]$ redis-cli
redis 127.0.0.1:6379> eval "nil .. 5" 0
(error) ERR Error compiling script (new function): user_script:1: unexpected symbol near 'nil'
redis 127.0.0.1:6379> eval "redis.call(\"DEL\")" 0
(error) ERR Error running script (call to f_2571a80b8303fc99a18ce0f7aeed3d7770d5c797): Wrong number of args calling Redis command From Lua script
As you can see, the pure Lua error reports the error at line 1 (but does not report the script SHA1 digest) while the Redis API call error (missing the key name to delete) does not.
The ideal behavior is that SHA1 digests and line numbers are always reported to aid debugging, log analysis, etc.