Small fix in error messages

This commit is contained in:
Alexandre Archambault
2016-05-09 19:25:21 +02:00
parent b917d43c41
commit 0f914cf781
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -779,7 +779,7 @@ object Cache {
checksums = checksums, checksums = checksums,
logger = logger, logger = logger,
pool = pool pool = pool
).leftMap(_.message).map { f => ).leftMap(_.describe).map { f =>
// FIXME Catch error here? // FIXME Catch error here?
new String(NioFiles.readAllBytes(f.toPath), "UTF-8") new String(NioFiles.readAllBytes(f.toPath), "UTF-8")
} }
+3 -1
View File
@@ -5,7 +5,9 @@ import java.io.File
sealed abstract class FileError( sealed abstract class FileError(
val `type`: String, val `type`: String,
val message: String val message: String
) extends Product with Serializable ) extends Product with Serializable {
def describe: String = s"${`type`}: $message"
}
object FileError { object FileError {