Stack Traces in mmc compiled modules
Cory Wright <cwright-dated-1045499169.4dfd27-fBYJ9vZApKkqcZcGjlUOXw@public.gmane.org> Wed, 12 Feb 2003 11:26:09 -0500
| Newsgroups | gmane.comp.lang.moto.devel |
|---|---|
| Organization | Stand Blue Technology |
| Message-ID | <[email protected]> |
This isn't really a bug, but it is a little confusing, so I am bringing it
up here.
I recently upgraded everything to 0.18.0 and recompiled all my mmc sites.
The site I use for markive development site is stored under
/usr/local/apache/devel/domains/standblue.net/devel/markive/ ,
while the path that the live (compiled) site uses is under
/usr/local/apache/domains/standblue.net/projects/markive/ .
The following error appeared in the live error log:
[Tue Feb 11 14:11:01 2003] [error] Uncaught ArrayBoundsException
message: Attempt to subscript array outside of declared bounds
ArrayBoundsException thrown in StringBuffer::append(1)(/usr/local/apache/devel/domains/standblue.net/devel/markive/lib.moto:
called from function printBody(1)(/usr/local/apache/devel/domains/standblue.net/devel/markive/lib.moto:266)
called from function showMessage(2)(/usr/local/apache/devel/domains/standblue.net/devel/markive/lib.moto:351)
called from function <main>(message.moto:20)
Since my setup is so simple I know what is going on here, but I could see
this being confusing for sites where modules were running on machines other
than the one it was compiled for.
I would expect the error message to list the file as something like
/usr/local/apache/domains/standblue.net/projects/markive/lib.moto instead,
but I realize that this is basically pointless, since it is a compiled site.
What I would propose is to change the error message from the full path of
the file during compile time, to a relative path based on the argument
given to mmc. So for example, if I compile markive with the following:
mmc -n markive /usr/local/apache/devel/domains/standblue.net/devel/markive/
Then any traces sent from the compiled module would be relative to the
directory given, so instead of seeing
called from function printBody(1)(/usr/local/apache/devel/domains/standblue.net/devel/markive/lib.moto:266)
we would see
called from function printBody(1)(lib.moto:266)
Is this a sensible thing to do?
Cory
--
Cory Wright
Stand Blue Technology
http://www.standblue.net/