blob: f4e3b472d83baa26a730916cc164df7693140ab9 (
plain) (
tree)
|
|
package dotty.tools
package dotc
package reporting
import core.Contexts.Context
import collection.mutable
import diagnostic.Message
import diagnostic.messages.Error
import Reporter._
/**
* This class implements a Reporter that throws all errors and sends warnings and other
* info to the underlying reporter.
*/
class ThrowingReporter(reportInfo: Reporter) extends Reporter {
def doReport(m: Message)(implicit ctx: Context): Unit = m match {
case _: Error => throw m
case _ => reportInfo.doReport(m)
}
}
|