Small fix in error messages

This commit is contained in:
Alexandre Archambault 2016-05-06 13:54:01 +02:00
parent b917d43c41
commit 0f914cf781
No known key found for this signature in database
GPG Key ID: 14640A6839C263A9
2 changed files with 4 additions and 2 deletions

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")
} }

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 {