catch PicklingException

This commit is contained in:
Eugene Yokota 2015-03-09 22:38:08 -04:00
parent a6193f2ed7
commit 4eff1d0262
1 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,7 @@ package sbt
import java.io.{ File, IOException }
import CacheIO.{ fromFile, toFile }
import sbinary.Format
import scala.pickling.PicklingException
import scala.reflect.Manifest
import scala.collection.mutable
import IO.{ delete, read, write }
@ -42,7 +43,8 @@ object Tracked {
val previous: Option[O] = try {
fromJsonFile[O](cacheFile).toOption
} catch {
case e: IOException => None
case e: PicklingException => None
case e: IOException => None
}
val next = f(in, previous)
IO.createDirectory(cacheFile.getParentFile)