blob: b0814565431296109546eeca2ce621a23bfc4ea2 (
plain) (
tree)
|
|
package dotty.tools
package dotc
package reporting
import core.Contexts.Context
import collection.mutable
import diagnostic.Message
import diagnostic.basic.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)
}
}
|