aboutsummaryrefslogblamecommitdiff
path: root/src/dotty/tools/dotc/reporting/ThrowingReporter.scala
blob: f1ee8ddb7abd1312e6a9e7ac3b06d4be9cf1d059 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                      
package dotty.tools
package dotc
package reporting

import core.Contexts.Context
import collection.mutable
import Reporter._

/**
 * This class implements a Reporter that stores all messages
 */
object ThrowingReporter extends Reporter {
  protected def doReport(d: Diagnostic)(implicit ctx: Context): Unit =
    if (d.severity == ERROR) throw d else println(d)
}