At 9:44 Uhr -0700 29.06.2002, Daisuke Maki wrote:
>?
>I would like to use AxErrorStylesheet as my uniform way of displaying
>errors in my AxKit application. The thing is, I would like to add more
>information to the XML that AxKit hands to the ErrorStylesheet.
>
>I looked through the code in CVS, and process_error() seems to be
>creating a XML string on the fly. But that means that if I want to add
>more info in the error XML, I would need to modify my copy of AxKit... I
>don't like that :/
>
>So, would you guys consider it if I sent a patch where the XML
>generation is done in Apache::AxKit::Exception instead of
>process_error()? This way I can simply throw a subclass of
>Apache::AxKit::Exception when I encounter errors, and use the
>ErrorStylesheet to decide what to print out.

I've already done something along this line: actually I've separated 
xml generation out of AxKit, and let AxKit only call ->as_errorxml on 
the thrown exception and render that. The exception classes then do 
use a base class that implements this as_errorxml method, which 
generates the xml. Well I haven't changed how the exceptions thrown 
by axkit *itself* are handled, just foreign exceptions. I guess it 
would make sense to make that all more uniform, though, so 
Apache::AxKit::Exception should ideally probably just be a subclass 
of the same class with the as_errorxml method. Maybe using multiple 
inheritance will help.

I've promised for a long time to publish the patch, the exception 
syntax filter and base classes, but didn't because of hard to solve 
problems in the filter, but I'll make an effort now and do it over 
this weekend.

Christian.
-- 
Christian Jaeger  Programmer & System Engineer  +41 1 430 45 26
ETHLife CMS Project - www.ethlife.ethz.ch/newcms - www.ethlife.ethz.ch

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to