[Adium-devl] Proposed AIXMLAppender patch for exception handling
Colin Barrett
timber at lava.net
Thu Feb 8 05:58:21 UTC 2007
I'm not sure this is the right approach.
I think if the write fails because of an exception, we should form our
own exception and pass it on up to the layer above, to let them handle
it. In most cases, we would just create a new appender.
Eventually I would like to refactor AILoggerPlugin -- it's a huge
mess. Some of the exception handling then could take place in
AIAppenderManager.
For now though, I think passing the exception up a layer is the
cleanest option.
-Colin
On Feb 7, 2007, at 3:32 PM, Evan Schoenberg wrote:
> The attached patch:
> 1. Uses @try/@catch to try to more cleanly handle problems writing
> out logs
> 2. Moves initialization of the NSFileHandle to -[AIXMLAppender
> prepareFileHandle] with no significant changes
> 3. Returns a success boolean from the writing / initialization
> methods which is not used at present but may later be useful
> 4. Fixes a comment typo.
>
> <xml-appender-error-handling.diff>
>
> Could other eyes - but particularly Graham and Colin - take a look
> at this and see if it seems like an improvement?
>
> Thanks,
> Evan_______________________________________________
> Adium-devl mailing list
> Adium-devl at adiumx.com
> http://adiumx.com/mailman/listinfo/adium-devl_adiumx.com
More information about the devel
mailing list