diff options
author | paltherr <paltherr@epfl.ch> | 2004-03-21 14:55:29 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2004-03-21 14:55:29 +0000 |
commit | f8d7d0b5a5a5fa24ff95b48b190eaa2677a7f876 (patch) | |
tree | 61dbc7a21e4eb7cfcae6df56cfb73a3ea51c08b3 /sources/scalac | |
parent | 100718a811b3cd5b991cb47217e0c1791dd48f3e (diff) | |
download | scala-f8d7d0b5a5a5fa24ff95b48b190eaa2677a7f876.tar.gz scala-f8d7d0b5a5a5fa24ff95b48b190eaa2677a7f876.tar.bz2 scala-f8d7d0b5a5a5fa24ff95b48b190eaa2677a7f876.zip |
- Fixed getSourceFile for case where file does ...
- Fixed getSourceFile for case where file does not exist
Diffstat (limited to 'sources/scalac')
-rw-r--r-- | sources/scalac/Global.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sources/scalac/Global.java b/sources/scalac/Global.java index ece6ae14b5..c7b2001a33 100644 --- a/sources/scalac/Global.java +++ b/sources/scalac/Global.java @@ -264,7 +264,10 @@ public abstract class Global { /** Reads and returns the source file in file with given name. */ public SourceFile getSourceFile(String filename) throws IOException { - return getSourceFile(AbstractFile.open(null, filename)); + AbstractFile file = AbstractFile.open(null, filename); + if (file == null) throw new FileNotFoundException( + "source file '" + filename + "' could not be found"); + return getSourceFile(file); } /** Reads and returns the source file in given abstract file. */ |