summaryrefslogtreecommitdiff
path: root/src/reflect
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-10-03 23:13:04 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-10-03 23:56:12 +0200
commitfb515bca0549cbc84a40b23889d1f038bcb0ef3a (patch)
tree47c27a7e0c292340f9b6ee765baefeb2e0bfded2 /src/reflect
parent992d255e2fc1ca487a60e38196ec4aa952617b92 (diff)
downloadscala-fb515bca0549cbc84a40b23889d1f038bcb0ef3a.tar.gz
scala-fb515bca0549cbc84a40b23889d1f038bcb0ef3a.tar.bz2
scala-fb515bca0549cbc84a40b23889d1f038bcb0ef3a.zip
renames macros.ReificationError to ReificationException
And again, this is not a fatal error, so it should end with an Error, and it should subclass not Throwable, but Exception.
Diffstat (limited to 'src/reflect')
-rw-r--r--src/reflect/scala/reflect/macros/Reifiers.scala12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/reflect/scala/reflect/macros/Reifiers.scala b/src/reflect/scala/reflect/macros/Reifiers.scala
index ed31663c68..0022a488b9 100644
--- a/src/reflect/scala/reflect/macros/Reifiers.scala
+++ b/src/reflect/scala/reflect/macros/Reifiers.scala
@@ -76,6 +76,14 @@ trait Reifiers {
// made these guys non path-dependent, otherwise exception handling quickly becomes a mess
-case class ReificationError(val pos: scala.reflect.api.Position, val msg: String) extends Throwable(msg)
+/** Indicates an expected error during one of the `reifyXXX` methods in [[scala.reflect.macros.Reifiers]].
+ * Such errors represent one of the standard ways for reification to go wrong, e.g.
+ * an attempt to create a `TypeTag` from a weak type.
+ */
+case class ReificationException(val pos: scala.reflect.api.Position, val msg: String) extends Exception(msg)
-case class UnexpectedReificationError(val pos: scala.reflect.api.Position, val msg: String, val cause: Throwable = null) extends Throwable(msg, cause)
+/** Indicates an unexpected expected error during one of the `reifyXXX` methods in [[scala.reflect.macros.Reifiers]].
+ * Such errors wrap random crashes in reification logic and are distinguished from expected [[scala.reflect.macros.ReificationException]]s
+ * so that the latter can be reported as compilation errors, while the former manifest themselves as compiler crashes.
+ */
+case class UnexpectedReificationException(val pos: scala.reflect.api.Position, val msg: String, val cause: Throwable = null) extends Exception(msg, cause)