Skip to content

Commit ee291bd

Browse files
committed
Merge pull request scala#4678 from stusmall/2.11.x
Improved error message for "filename too long" build errors
2 parents 0e41dea + cb8d924 commit ee291bd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,10 @@ abstract class GenASM extends SubComponent with BytecodeWriters { self =>
532532
case e: java.lang.RuntimeException if e.getMessage != null && (e.getMessage contains "too large!") =>
533533
reporter.error(sym.pos,
534534
s"Could not write class $jclassName because it exceeds JVM code size limits. ${e.getMessage}")
535+
case e: java.io.IOException if e.getMessage != null && (e.getMessage contains "File name too long") =>
536+
reporter.error(sym.pos, e.getMessage + "\n" +
537+
"This can happen on some encrypted or legacy file systems. Please see SI-3623 for more details.")
538+
535539
}
536540
}
537541

0 commit comments

Comments
 (0)