If I download a big file with scala.sys.process
like this:
import java.io.File
import java.net.URL
import scala.sys.process._
new URL("http://www.scala-lang.org/") #> new File("scala-lang.html") !
If there is some problem during the download, the stack trace will just print at stderr but it is not caught in my try-catch block. I believe there are ways to catch the error and retry, but how do I do that?