summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-10-03 23:06:12 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-10-03 23:56:03 +0200
commit1b2415865984071036c5f61e82a4a7048d4d18ee (patch)
tree0d19565709d790063735ae429ff262076eb67aa4
parent9930b559fe657d517abeb3e4e4ffb3a2a6e00ee0 (diff)
downloadscala-1b2415865984071036c5f61e82a4a7048d4d18ee.tar.gz
scala-1b2415865984071036c5f61e82a4a7048d4d18ee.tar.bz2
scala-1b2415865984071036c5f61e82a4a7048d4d18ee.zip
renames macros.ParseError to ParseException
Because it's not a fatal error. Neither it should subclass Throwable.
-rw-r--r--src/compiler/scala/reflect/macros/runtime/Parsers.scala2
-rw-r--r--src/reflect/scala/reflect/macros/Parsers.scala5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/compiler/scala/reflect/macros/runtime/Parsers.scala b/src/compiler/scala/reflect/macros/runtime/Parsers.scala
index ab9b94ec9f..566bcde73d 100644
--- a/src/compiler/scala/reflect/macros/runtime/Parsers.scala
+++ b/src/compiler/scala/reflect/macros/runtime/Parsers.scala
@@ -19,6 +19,6 @@ trait Parsers {
} catch {
case ToolBoxError(msg, cause) =>
// todo. provide a position
- throw new ParseError(universe.NoPosition, msg)
+ throw new ParseException(universe.NoPosition, msg)
}
}
diff --git a/src/reflect/scala/reflect/macros/Parsers.scala b/src/reflect/scala/reflect/macros/Parsers.scala
index c2d4d8a3ab..d3aabcff0d 100644
--- a/src/reflect/scala/reflect/macros/Parsers.scala
+++ b/src/reflect/scala/reflect/macros/Parsers.scala
@@ -10,5 +10,6 @@ trait Parsers {
def parse(code: String): Tree
}
-// should be path-dependent, otherwise exception handling becomes a mess
-case class ParseError(val pos: scala.reflect.api.Position, val msg: String) extends Throwable(msg)
+/** Indicates an error during [[scala.reflect.macros.Parsers#Parse]].
+ */
+case class ParseException(val pos: scala.reflect.api.Position, val msg: String) extends Exception(msg)