commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <>
Subject RE: [proposal] Location utilities
Date Wed, 14 Sep 2005 13:31:29 GMT
Tapestry and HiveMind don't always use exceptions to print the line-precise
error messages.  Sometimes, it's just an error/warning message sent to a Log
(JCL) (you forgot to include an implementation for a service point in
HiveMind).  Does your Cocoon code support that also or is it more
exception-oriented?  I would assume that since the classes on the stack are
able to determine their location information that they could just print it
out as a logging message.

-----Original Message-----
From: news [] On Behalf Of Sylvain Wallez
Sent: Wednesday, September 14, 2005 6:08 AM
Subject: [proposal] Location utilities

Hi there,

A large number of applications are dealing with configuration files 
(server.xml, struts-actions.xml, cocoon.xconf, etc) and semi-interpreted 
languages (Cocoon's sitemap, template languages in Tapestry, Cocoon and 
Velocity, etc).

A common problem with all these files is to report some meaningful 
location information in the corresponding files when some problems 
related to the information they contain occur (syntax error, invalid 
class name, unkown component, etc). In such cases, the raw Java 
exception is often of little use if it doesn't carry some location 

Tapestry has for long had its nice "line precise error reporting" (see 
[1], section 2.14), and we needed something similar for Cocoon. However 
Cocoon needed more than this as request handling involves several levels 
of semi-interpreted languages, such as the sitemap, XSLT or JavaScript.

So at Cocoon we have built a utility package that allow for location 
stacktraces that complement regular Java stacktraces in exceptions. The 
various levels of the Java call stack can also add their own location 
information to the orginal exception without requiring exception 
nesting, which leads to smaller, easier to understand stracktraces.

I would like to propose this utility package for inclusion in Jakarta 
Commons. This would allow for other projects to provide more easily some 
meaningfull error reports, and, if successful, would make error 
reporting globally more consistent when different products are used 

You can see this utility in action at [2], and browse the source code in 
Cocoon's SVN [3]. It has no dependency except commons-lang where IMHO it 
would fit nicely.

What do you think? Is it of interest to the commons project?



Sylvain Wallez                        Anyware Technologies
Apache Software Foundation Member     Research & Technology Director

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message