File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -452,7 +452,18 @@ abstract class CompilerTest {
452
452
processFileDir(sourceFile, { sf =>
453
453
if (extensionsToCopy.contains(sf.extension)) {
454
454
dest.parent.jfile.mkdirs
455
- dest.toFile.writeAll(s " /* !!!!! WARNING: DO NOT MODIFY. Original is at: $sf !!!!! */ " , sf.slurp)
455
+ try {
456
+ scala.reflect.io.File (dest)(scala.io.Codec .UTF8 ).writeAll(s " /* !!!!! WARNING: DO NOT MODIFY. Original is at: $sf !!!!! */ " , sf.slurp(" UTF-8" ))
457
+ } catch {
458
+ case unmappable : java.nio.charset.UnmappableCharacterException => {
459
+ log(s " ERROR: reading file $sf failed to decode: $unmappable" )
460
+ throw unmappable
461
+ }
462
+ case t : Throwable => {
463
+ log(s " ERROR: file $sf failed for some other reason: $t" )
464
+ throw t
465
+ }
466
+ }
456
467
} else {
457
468
log(s " WARNING: ignoring $sf" )
458
469
}
You can’t perform that action at this time.
0 commit comments