[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: User Friendly is not Computer Friendly - paths in error tracebacks
- From: Gavin Kistner <gavin@...>
- Date: Fri, 3 Mar 2006 09:27:14 -0700
I have a (Ruby) script that runs a Lua script, catches output to
stdout and stderr, and makes some HTML output which, among other
things, provides links to the file/line where an error occurred.
(This is for TextMate on MacOS X.)
Unfortunately, when the path is long, the lua standalone runtime
'helpfully' truncates the paths:
lua: ./../orxit.lua:6: wtf
[C]: in function 'assert'
./../orxit.lua:6: in function 'jibble'
...s/gavinkistner/Desktop/pork \ % : butt/bling/tmp.lua:12: in
...s/gavinkistner/Desktop/pork \ % : butt/bling/tmp.lua:7: in
...s/gavinkistner/Desktop/pork \ % : butt/bling/tmp.lua:15: in main
Ignoring the pathological directory name I have there, I have the
problem that the interpretter chopped off the leading "/Users/".
Is there any way to tell the runtime NOT to do this truncation? If
not, would someone more familiar with the internals than I be kind
enough to provide a patch for 5.1 that leaves the full paths intact?
"When I am working on a problem I never think about beauty. I only
think about how to solve the problem. But when I have finished, if
the solution is not beautiful, I know it is wrong."
- R. Buckminster Fuller