aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/reporting/ThrowingReporter.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-09-23 12:26:55 +0200
committerMartin Odersky <odersky@gmail.com>2013-09-23 12:28:05 +0200
commitc90e09fc7bd79c3bf9c95ce87f3c11cb3dfd4405 (patch)
tree85ca8768f5d4544bf6c5940393a18abaf90b4a57 /src/dotty/tools/dotc/reporting/ThrowingReporter.scala
parent625d7ad00d43fb77df55c1ace30db1e6ccdf6179 (diff)
downloaddotty-c90e09fc7bd79c3bf9c95ce87f3c11cb3dfd4405.tar.gz
dotty-c90e09fc7bd79c3bf9c95ce87f3c11cb3dfd4405.tar.bz2
dotty-c90e09fc7bd79c3bf9c95ce87f3c11cb3dfd4405.zip
Changed Throwing reporting scheme.
Changed ThrowingReporter to use an underlying reporter for issuing messages below ERROR. Made ThrowingReporters the default in initialContext.
Diffstat (limited to 'src/dotty/tools/dotc/reporting/ThrowingReporter.scala')
-rw-r--r--src/dotty/tools/dotc/reporting/ThrowingReporter.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/reporting/ThrowingReporter.scala b/src/dotty/tools/dotc/reporting/ThrowingReporter.scala
index f1ee8ddb7..d44a08fb6 100644
--- a/src/dotty/tools/dotc/reporting/ThrowingReporter.scala
+++ b/src/dotty/tools/dotc/reporting/ThrowingReporter.scala
@@ -9,7 +9,7 @@ import Reporter._
/**
* This class implements a Reporter that stores all messages
*/
-object ThrowingReporter extends Reporter {
+class ThrowingReporter(reportInfo: Reporter) extends Reporter {
protected def doReport(d: Diagnostic)(implicit ctx: Context): Unit =
- if (d.severity == ERROR) throw d else println(d)
+ if (d.severity == ERROR) throw d else reportInfo.report(d)
}