Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


SAXException, checked, buy why?

From: Alan Gutierrez <alan-xml-dev@-----.--->
To: xml-dev@-----.---.---
Date: 1/2/2005 12:42:00 AM
What was the thinking behind making SAXException a checked
    exception?
   
    I'm considering removing them from my SAX Strategy library, and
    attempting to replace them with an error handling interface that
    throws unchecked exceptions of the user's choice.

    It would allow me to do things like:

    Composer composer = new Composer();

    Composer map = composer.launch("map", new PairedEventListener() {
        public void start(Campaign campaign, Event event) {
            campaign.getSink()
                    .getSpigot()
                    .startAttributes(event.getElement())
                        .attribute("extra-attribute", 1)
                    .startElement(event.getElement());
        }
        public void end(Campaign campaign, Event event) {
            event.getElement().forward(campaign.getSink())
        }
    }

    When I'm writing a lot of little anonymous classes, the method
    signature gets cumbersome, and I can see that I'm only
    propigating the exception.

    It's unslightly. If it's simply a matter of taste, I think I
    might make it more inline with my taste.

    Kind regards.

--
Alan Gutierrez - alan@e...


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent