-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Using fresh SVN (r895918) I have been trying to diagnose an error, but can't
even tell if it is in my code or the couch code. The error log starts like
this:
[info] [<0.806.0>] OS Process #Port<0.1810> Log :: function raised error:
(new TypeError("err is undefined", "", 843))
stacktrace: ([object Error],true)@:843
()@:1028
runProvides([object Object])@/space/couchdb/share/server/main.js:290
runList( ... followed by several kilobytes of my code after all the !code
and !json macros have been expanded and newlines removed so it runs on as
one huge long line.
I assume the numbers are line numbers but in whose code? There is really no
point in spewing out multiple kilobytes of code in the log message. The
single nicest thing would be to emit the lines of code corresponding to the
traceback, ideally with two or three lines before or after as context.
Perhaps we also need some scheme like how the C preprocessor does #line so
it is possible to work out which files the lines actually correspond to.
Another example way of inducing a tough to diagnose error is to write a show
function using start and send. (start and send work just fine for list
functions and ideally should also work for shows but the error is non-obvious.)
Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAktC49kACgkQmOOfHg372QSHOgCeMoCwTJPfzpnsKnwu1M7DRs1z
F/UAn1SPLdBfpERQRx6RAmQ99WR0N3fj
=HB5L
-----END PGP SIGNATURE-----