The RenderException functionality was removed because most exceptions
provide an overridden ToString method which includes the required
details. The implementation of RenderException only included the
exception Type, Message, Source, Stack Trace and nested exception. If a
specific exception has more information then it is reasonable to expect
that it will be included as part of the exception's ToString().

> I use the old RenderException method in a class that derives 
> from DefaultRenderer to get Exceptions to into a workable XML format.

Note that the RenderException method did not produce valid XML, nor was
it designed to.

If you need to implement a custom rendering for your own exception types
(or any other types) then write an object that implements the
IObjectRenderer interface supports the rendering of your type. You can
implement a separate object for each type or a single type that handles
all your custom types. Then register your object renderer for your
custom types by specifying the <renderer> tag in the config file:

<renderer renderingClass="MyExceptionRenderer"
renderedClass="MyClass.MyFunkyException" />

Cheers,
Nicko

> -----Original Message-----
> From: Zimney, Christopher M. [mailto:[EMAIL PROTECTED] 
> Sent: 18 April 2006 22:55
> To: [email protected]
> Subject: Oh where, oh where has my little RenderException() gone?
> 
> I use the old RenderException method in a class that derives 
> from DefaultRenderer to get Exceptions to into a workable XML format.
> 
> Looking through 1.2.9 stuff, I see that this has gone far, 
> far away and isn't listed in the breaking changes section of 
> the docs.  Was anyone else using this method and found a work 
> around without having to customize log4net source?
> 
> override protected string RenderException (RendererMap 
> rendererMap, Exception e) 
> 
> Sadly,
> 
> chris
> 
> 

Reply via email to