Re: Stack Traces in mmc compiled modules

David Hakim <dhakim-Gkm/TONP9n1Wk0Htik3J/[email protected]> Wed, 12 Feb 2003 11:38:17 -0500
Newsgroups gmane.comp.lang.moto.devel
Message-ID <[email protected]>
	Sounds sensible to me. I know Cyb.org has been complaining about full  
paths in error message for a while. Would anyone like to volunteer to  
fix this ?

-Dave

On Wednesday, February 12, 2003, at 11:26  AM, Cory Wright wrote:

> 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/
>