src/Pure/Tools/build.scala
changeset 51244 d8ca566b22b3
parent 51230 19192615911e
child 51252 03d1fca818a4
equal deleted inserted replaced
51243:ffd9d7f73e65 51244:d8ca566b22b3
   691             find_log(name) match {
   691             find_log(name) match {
   692               case Some((_, path)) => (path, File.read(path))
   692               case Some((_, path)) => (path, File.read(path))
   693               case None => (Path.current, "")
   693               case None => (Path.current, "")
   694             }
   694             }
   695         }
   695         }
       
   696 
       
   697       def ignore_error(msg: String): (List[Properties.T], Double) =
       
   698       {
       
   699         java.lang.System.err.println("### Ignoring bad log file: " + path +
       
   700           (if (msg == "") "" else "\n" + msg))
       
   701         (Nil, 0.0)
       
   702       }
       
   703 
   696       try {
   704       try {
   697         val info = parse_log(false, text)
   705         val info = parse_log(false, text)
   698         val session_timing = Markup.Elapsed.unapply(info.session_timing) getOrElse 0.0
   706         val session_timing = Markup.Elapsed.unapply(info.session_timing) getOrElse 0.0
   699         (info.command_timings, session_timing)
   707         (info.command_timings, session_timing)
   700       }
   708       }
   701       catch {
   709       catch {
   702         case ERROR(msg) =>
   710         case ERROR(msg) => ignore_error(msg)
   703           java.lang.System.err.println("### Ignoring bad log file: " + path + "\n" + msg)
   711         case _: XML.XML_Atom | _: XML.XML_Body => ignore_error("")
   704         (Nil, 0.0)
       
   705       }
   712       }
   706     }
   713     }
   707 
   714 
   708     val queue = Queue(selected_tree, load_timings)
   715     val queue = Queue(selected_tree, load_timings)
   709 
   716