Skip to content

UncheckedIOException #65

@elharo

Description

@elharo

Affected version

HEAD

Bug description

There are several UncheckedIOExceptions for issues that can definitely happen, and that are not handled where they should be. E.g.

    protected Object eval(ScriptEngine engine, ScriptContext context) throws ScriptException {
        try (FileReader reader = new FileReader(scriptFile)) {
            return engine.eval(reader, context);
        } catch (IOException ex) {
            throw new UncheckedIOException(scriptFile + " caused:", ex);
        }
    }

This is risky and bug prone. Ideally these should be changed to IOException, but if API compatibility prevents that it looks like most could be replaced with a ScriptException instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions