diff options
author | Martin Odersky <odersky@gmail.com> | 2013-07-19 20:14:08 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-07-19 23:54:31 +0200 |
commit | a39551f990be08dc7168374e74228b9388160aec (patch) | |
tree | 34d1e2015f78abf2cb6aa837088d52f8b12f359f /src/dotty/tools/dotc/reporting/ThrowingReporter.scala | |
parent | 919310a29daebabe3335d428f5f5e52ed6295cbd (diff) | |
download | dotty-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.scala | 15 |
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) +} |