Skip to content

UncheckedIOException #65

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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