aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/reporting/ThrowingReporter.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-07-19 20:14:08 +0200
committerMartin Odersky <odersky@gmail.com>2013-07-19 23:54:31 +0200
commita39551f990be08dc7168374e74228b9388160aec (patch)
tree34d1e2015f78abf2cb6aa837088d52f8b12f359f /src/dotty/tools/dotc/reporting/ThrowingReporter.scala
parent919310a29daebabe3335d428f5f5e52ed6295cbd (diff)
downloaddotty-a39551f990be08dc7168374e74228b9388160aec.tar.gz
dotty-a39551f990be08dc7168374e74228b9388160aec.tar.bz2
dotty-a39551f990be08dc7168374e74228b9388160aec.zip
Integrated reporting into TyperState.
Diffstat (limited to 'src/dotty/tools/dotc/reporting/ThrowingReporter.scala')
-rw-r--r--src/dotty/tools/dotc/reporting/ThrowingReporter.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/reporting/ThrowingReporter.scala b/src/dotty/tools/dotc/reporting/ThrowingReporter.scala
new file mode 100644
index 000000000..f1ee8ddb7
--- /dev/null
+++ b/src/dotty/tools/dotc/reporting/ThrowingReporter.scala
@@ -0,0 +1,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)
+}