← Prev in month ← Prev in thread

SAXException, checked, buy why?

From
Alan Gutierrez <>
To
Date
2005-01-02T00:42:20Z
ID
<>
Thread
SAXException, checked, buy why?
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 - 
← Prev in month ← Prev in thread