Skip to content

Improve handling of IOExceptions in the compiler #886

Open
@retronym

Description

@retronym
  • Avoid globalError(ex.getMessage) in compileFiles unless for some reason we're sure the exception message is sufficient for a particular exception. That would be better to deal with by introducing a new custom exception for "message only" failures and throwing that from very particular spots.

  • Be more selective about when to report an encoding error in SourceReader.read.

scalac DoesNotExist.scala
error: IO error while decoding DoesNotExist.scala with UTF-8: DoesNotExist.scala (No such file or directory)
Please try specifying another one using the -encoding option
1 error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions