Skip to content

Throw RuntimeExceptions only from XmlBuilder.create #4

Closed
@davidmoten

Description

@davidmoten

When I want to create some small bit of xml the builder is great but having to catch exceptions is horrible.

To make everyone's code cleaner you could wrap the ParserConfigurationException with a new ParserConfigurationRuntimeException and ditto for FactoryConfigurationError wrapped by FactoryConfigurationRuntimeException. Then XmlBuilder.create could throw only RuntimeExceptions and those that wanted the detailed catch behaviour could catch them. Forcing the handling of checked exceptions in a library aiming for code brevity with chaining is a shame in my opinion.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions